We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GetCol() not returning the correct column

Thread ID:

Created:

Updated:

Platform:

Replies:

59762 Apr 20,2007 06:13 PM Apr 20,2007 07:26 PM Windows Forms 1
loading
Tags: GridControl
Tom Zehrbach
Asked On April 20, 2007 06:13 PM

int realCol = source.GetCol(source.CurrentCell.ColIndex) - 1;

The above statement works fine as long as the user hasn't scrolled to the right, leaving 1 or more of the left-most columns hidden. In otherwords, if the left-most column isn't column 0, the above statement doesn't work.

Any ideas how to fix?

Administrator [Syncfusion]
Replied On April 20, 2007 07:26 PM

Here is the summary description for GridControlBase.GetCol.

Returns the absolute column index for a client column index.

CurrentCell.ColIndex is not a client column incex. It is an absolute index.

Exactly what value to you want to compute? If you just always use
CurrentCell.ColIndex - 1, does that always return teh value you want?

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;