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 in GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

13372 Apr 27,2004 03:50 PM UTC Apr 27,2004 08:23 PM UTC WinForms 3
loading
Tags: GridControl
Daws
Asked On April 27, 2004 03:50 PM UTC

I''d like to set up the grid to allow only single Row selection. When the selection changes I''d like to update a details section of the screen. I''ve got an event handler on grid.Model.SelectionChanged, and I''ve set the AllowSelection on the grid to only Row and AlphaBlend. The problem is that the selected row never changes, even though another row is visually selected. The triangle pointer in the row column never changes from the first row. How can I get my desired behaviour and what event should I be listening to? Thanks, Daws

Administrator [Syncfusion]
Replied On April 27, 2004 06:16 PM UTC

Hi Daws, instead of changing AllowSelection try setting grid.Options.ListBoxSelectionMode = System.Windows.Forms.SelectionMode.One; I think that is the behavior you are looking for. You can then check for CurrentCellMoved and CurrentCellActivated events. These events are raised when the current cell is moved. In the event handlers you can check whether the cell was moved to a new row and if that is the case then update your details information in the form. Stefan

Daws
Replied On April 27, 2004 06:46 PM UTC

Thanks, that worked. One more minor detail. Is there a way to hide the Selected row arrow that appears in the Row header? The correct row gets highlighted, but the row selection arrow always stays on the first row. Thanks, Daws

Administrator [Syncfusion]
Replied On April 27, 2004 08:23 PM UTC

That''s odd. The selection arrow should be moving together with the slected row. You are using a databound grid, correct? Anyway, if you do not want any arrow to appear you can change this.gridDataBoundGrid1.BaseStylesMap["Row Header"].StyleInfo.CellType = "Header"; Stefan

CONFIRMATION

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.

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

;