The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team April 27, 2004 01:16 PM
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
DADawsApril 27, 2004 01: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.
Thanks,
Daws
ADAdministrator Syncfusion Team April 27, 2004 03: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";
Stefan