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.

SelectedRecords help

Thread ID:





55623 Feb 1,2007 01:53 PM Feb 1,2007 02:14 PM Windows Forms 1
Tags: GridControl
James Blibo
Asked On February 1, 2007 01:53 PM

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 02:14 PM

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.

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.