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
close icon

GGC Row selection

Currently we use the 0 column to display row numbers so there is no indicator that the row is selected. In order to resolve this I am using a background image on the group indent column. In the gridGroupingControl1_QueryCellStyleInfo I use the following code: if (e.TableCellIdentity.TableCellType == GridTableCellType.GroupIndentCell) if (e.TableCellIdentity.RowIndex == gridGroupingControl1.TableControl.CurrentCell.RowIndex) e.Style.BackgroundImage = this.imagePrint.Images[1]; However this doesn''t work when you select the 0 column. So I added the following to workaround that issue: private void gridGroupingControl1_TableControlCurrentCellActivated(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableControlEventArgs e) { if (e.TableControl.CurrentCell.ColIndex == 0) e.TableControl.CurrentCell.MoveRight(2); } This works sort of. It takes a long time upto 30 seconds for the selection to actually occur. Is there a better way to do this (either the move or the background image when selecting the 0 column).

2 Replies

VS Vijayanand S Syncfusion Team February 27, 2006 09:24 AM UTC

Hi Chuck, Can you please check if the code below helps, try instead of TableControlCurrentCellActivated. private void gridGroupingControl1_TableControlCellClick(object sender, GridTableControlCellClickEventArgs e) { e.TableControl.CurrentCell.MoveTo(e.Inner.RowIndex,e.Inner.ColIndex); } Best regards, Stanley


AD Administrator Syncfusion Team February 27, 2006 03:12 PM UTC

Actually I also have that code already in. if (e.Inner.RowIndex != e.TableControl.CurrentCell.RowIndex) e.TableControl.CurrentCell.MoveTo(e.Inner.RowIndex, 2, GridSetCurrentCellOptions.SetFocus|GridSetCurrentCellOptions.ForceRefresh); I ended up using a timer to do the move. So in the activatecell method I enable the timer and then performs the move. This seems to work ok.

Loader.
Live Chat Icon For mobile
Up arrow icon