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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GGC current cell column name

Thread ID:

Created:

Updated:

Platform:

Replies:

33252 Aug 16,2005 07:16 PM UTC Aug 17,2005 11:51 AM UTC WinForms 2
loading
Tags: GridControl
Brian Corley
Asked On August 16, 2005 07:16 PM UTC

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.

Administrator [Syncfusion]
Replied On August 16, 2005 07:41 PM UTC

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);
	}
}

Brian Corley
Replied On August 17, 2005 11:51 AM UTC

Got it

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.

Warning Icon 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.Close Icon

;