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.

How can I get CellValue

Thread ID:

Created:

Updated:

Platform:

Replies:

58751 Mar 27,2007 03:11 PM Mar 28,2007 12:00 AM Windows Forms 1
loading
Tags: Grouping
Hongbin Zhang
Asked On March 27, 2007 03:11 PM

Hi,

I use GridTableControlCellClickEventHandler to listen a mouse click event on a GGC cell. I want to get a column index of a col name so I can use:

obj = this.groupingGridTrade.TableModel.Model[e.Inner.RowIndex, colIndex].CellValue;

How can I do it?

Thanks,
HB

Jeba S [Syncfusion]
Replied On March 28, 2007 12:00 AM

Hi HB,

You can get the column index of a column name using the TableDescriptor.NameToField.

private void gridGroupingControl1_TableControlCellClick(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlCellClickEventArgs e)
{
string colName=e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex).TableCellIdentity.Column.Name;
int colIndex=e.TableControl.TableDescriptor.NameToField(colName) ;
object s=e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, colIndex).CellValue;
Console.WriteLine("CellValue="+s);
Console.WriteLine(e.TableControl.GetTableViewStyleInfo(e.Inner.RowIndex, e.Inner.ColIndex).Text);
}

Kindly let us know if this helps.

Best Regards,
Jeba.

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.

;