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

Row selection problem

Thread ID:





18178 Aug 25,2004 12:29 PM UTC Mar 28,2018 04:26 AM UTC WinForms 7
Tags: GridControl
Asked On August 25, 2004 12:29 PM UTC

Hi Clay, Could you please help to fix two related problems: 1. I click row and column 1 to highlight a row. Then I click down arrow on the keyboard to move to the next row. It moves triangle, but doesn’t highlight the next row. 2. I am on tabpage1. I highlight a row 3 by clicking on that row and column 1. The triangle is correct and row is highlighted. Then I moved to tabpage 2. When I move back to tabpage 1, the first row has triangle but the row 3 still highlighted. The down arrow does not work now. So how to make highlighted row be a current row, i.e. coordinate the highlighting with the triangle? Thanks in advance

Administrator [Syncfusion]
Replied On August 25, 2004 12:50 PM UTC

1) If you use grid.ListBoxSelectionMode = SelectionMode.one, then the grid will make sure the row selection moves with the current cell. If you do not set this property, then selected rows are not related to teh current cell (current row). So, there is no attempt by the grid to keep these two different things in sync. In this case, if you want selected row to move with the current cell, then you will have to handle probably two events, SelectionsChanging to remember that a row was selected, and then CurrentCellMoving (or Moved maybe) to actully unselect the old row and select the next current row after the cell has moved. To select a row you can use grid.Selections.Add or grid.Selections.SelectRange. But if setting the ListBoxSelectionMode property will serve your needs, that would be the simplest way to handle things. 2) Using ListBoxSelectionMode may take care of this problem also. If not, I suspect the selections are not being seen because the grid does not get the focus when you click teh tab. Maybe catching an event that is raised when the new tab is shown, an dthere explcitly doing grid.Focus() will make this problem go away.

Replied On August 25, 2004 01:23 PM UTC

Thanks Clay. I used grid.ListBoxSelectionMode = SelectionMode.one and grid.SetFocus() and it solved all problems except one: when I use down arrow to move let''s say from row 1 to row 3, visually everything is okay, but in debugger the cc.RowIndex still is 1, not 3. Only if I highlight row by clicking, it changes the RowIndex...So I cannot pick up correct text from the cell. Thanks

Administrator [Syncfusion]
Replied On August 25, 2004 01:51 PM UTC

I tried to see such a problem in this sample and could not (using the latest release Can you see the problem in this sample? If so, what steps do I take to see it?

Administrator [Syncfusion]
Replied On August 25, 2004 01:52 PM UTC

Replied On August 25, 2004 05:32 PM UTC

Thanks Clay, It works now.

Replied On March 27, 2018 06:39 PM UTC


Sindhu Nagarajan [Syncfusion]
Replied On March 28, 2018 04:26 AM UTC

Hi Radwan, 
Thanks for the update.  
Please let us know if you need any further assistance on this. 


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

or the page will be automatically redirected to 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