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.
Hi together,
I have gridcontrol and I want to set for a special row that no cell in this row can''t be selected not even the whole row.
How can this be done programmatically?
Kind regards,
Franz
ADAdministrator Syncfusion Team September 14, 2005 02:18 PM UTC
Hi Franz,
You can easily prevent a row from being selected using the SelectionChanging event, and cancelling it if the a particular row is in the selections. Below is a little snippet. But this will just stop the selection at that row. You would not be able to continue dragging and select other rows on the opposite side of the currently selected rows.
private void gridControl1_SelectionChanging(object sender, Syncfusion.Windows.Forms.Grid.GridSelectionChangingEventArgs e)
{
// For row 3.
if(e.Range.IntersectsWith(GridRangeInfo.Row(3)))
e.Cancel = true;
}
Regards,
Leo.