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?
ADAdministrator Syncfusion Team April 27, 2004 02:16 PM
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.
DADawsApril 27, 2004 02:46 PM
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.
ADAdministrator Syncfusion Team April 27, 2004 04:23 PM
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";