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. Image for the cookie policy date

GGC current cell column name

Is there a way one I have ref to the current cell to get the name of the column it falls under or the name of the property it was bound to? When validating I need to know more than just the data type I need to know the column name. Also, FYI I have hierchical data.

2 Replies

AD Administrator Syncfusion Team August 16, 2005 02:41 PM

Here is code to get the column in TableControlCurrentCellValidating.
private void gridGroupingControl1_TableControlCurrentCellValidating(object sender, GridTableControlCancelEventArgs e)
{
	GridCurrentCell cc = e.TableControl.CurrentCell;
	GridTableCellStyleInfo style = e.TableControl.Table.GetTableCellStyle(cc.RowIndex, cc.ColIndex);
	GridColumnDescriptor cd = style.TableCellIdentity.Column;
	if(cd != null)
	{
        // cd is the columndescriptor
		Console.WriteLine(cd.Name);
	}
}


BC Brian Corley August 17, 2005 06:51 AM

Got it

Loader.
Live Chat Icon For mobile
Up arrow icon