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.
Syncfusion Feedback

Column Name..

Thread ID:

Created:

Updated:

Platform:

Replies:

20501 Oct 19,2004 10:49 PM UTC Oct 20,2004 10:53 PM UTC Windows Forms 3
loading
Tags: Grouping
Angela Chua
Asked On October 19, 2004 10:49 PM UTC

Hi I want to detech whether a user''s key down is on a particular column. My codes is currently like this. If ggcOrderProfileTestResults.TableControl.CurrentCell.ColIndex = 6 Then But i think i will detech error if user use sorting on the grid then the colindex wil run. ANyone can tell me how to code such that.. i get the colName instead of the colindex?

Angela Chua
Replied On October 20, 2004 01:13 AM UTC

by the way, i need to capture this under gridgrouping_validating event. thankz

Administrator [Syncfusion]
Replied On October 20, 2004 05:28 AM UTC

Here is a snippet that shows how to get the column name (and other values) in theTableControlCUrrentCellValidating event.
private void gridGroupingControl1_TableControlCurrentCellValidating(object sender, GridTableControlCancelEventArgs e)
{
	GridCurrentCell cc = e.TableControl.CurrentCell;
	Console.WriteLine("new: {0}     old: {1}", cc.Renderer.ControlText, e.TableControl.Model[cc.RowIndex, cc.ColIndex].CellValue);
	GridTableCellStyleInfo style = e.TableControl.Model[cc.RowIndex, cc.ColIndex] as GridTableCellStyleInfo;
	if(style != null)
	{
		Console.WriteLine("column: {0}", style.TableCellIdentity.Column.Name);
	}
}

Angela Chua
Replied On October 20, 2004 10:53 PM UTC

Thankz.. it works well..

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

;