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

GGC Row selection

Thread ID:





41209 Feb 24,2006 04:30 PM UTC Feb 27,2006 03:12 PM UTC WinForms 2
Tags: GridControl
Administrator [Syncfusion]
Asked On February 24, 2006 04:30 PM UTC

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).

Vijayanand S [Syncfusion]
Replied On 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

Administrator [Syncfusion]
Replied On 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.


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