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.
Is there a way to set a row in a state that it can''t be selected in the GDBG?
I have some DataRows in the datasource which have a logical state and they should not be selectable in the grid. By default, the ListBoxSelectionMode is set to One, it should also work when it is set to MultiExtended.
Which events have to be used to achive this?
1. the row cannot be selected, also when MultiExtended is set
2. The row is visual marked(PrepareViewStyleInfo(?) to changing text color)
Regards
Thomas
ADAdministrator Syncfusion Team June 7, 2004 05:41 PM UTC
To avoid a row, say someRowIndex, being included in a selection, you can handle the grid.Model.SelectionsChanging event. If e.Range.IntersectsWith(GridRangeInfo.Row(someRowIndex)), then you can set e.Cancel to prevent the selection. To color such a row, you would use grid.PrepareViewStyleInfo, setting e.Style.BackColor if e.RowIndex equals someRowIndex.