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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SelectedRecords help

Thread ID:





55623 Feb 1,2007 06:53 PM UTC Feb 1,2007 07:14 PM UTC WinForms 1
Tags: GridControl
James Blibo
Asked On February 1, 2007 06:53 PM UTC

I have a flat ggc, like a listview.
I have 5 colummns (col1, col2, col3, col4, col5).

I have enable multi-select by using the floowing settings...

this.ggc.TableOptions.AllowSelection = GridSelectionFlags.None; this.ggc.TableOptions.ListBoxSelectionMode = SelectionMode.MultiSimple;

col1 - col3 are Static readonly cell and col4 and col5 are editable.

I want to make it such that only col1 - col3 should be able to select the cell. col4 and col5 should be like regular cell. The reason being that in the default implementation, clicking col4 and col5 first toggle the selection mode of the row before putting the cell in edit mode. Consequently, you have to click the cell almost twice to edit col 4 or col 5.

I am handling the SelectedRecordsChanging event to see if I can do this, but I can seem to get the column name or or index from this event because it is executing before the other events.

Administrator [Syncfusion]
Replied On February 1, 2007 07:14 PM UTC

Hi James,

Could you please try this code.

private void gridGroupingControl1_TableControlMouseDown(object sender, GridTableControlMouseEventArgs e)
int row,col;
if( e.TableControl.PointToRowCol(new Point(e.Inner.X,e.Inner.Y ),out row,out col))
int field = e.TableControl.TableDescriptor.ColIndexToField(col);
if( field > -1)
string ColumnName = e.TableControl.TableDescriptor.Columns[field].Name;
if( ColumnName == "Col2")

Best Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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