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.
we have Syncfusion 6.3.1.8. I know, not the latest but I wonder if it is my way of thinking or a bug in that version: The user can select rows in a griddataboundgrid. If more than one row is selected, a special button has to be disabled. The problem: The user selects via mouse: code runs ok, button is disabled. User selects via keyboard: code allways returns that only one row is selected!
Dim gridList As Syncfusion.Windows.Forms.Grid.GridRangeInfoList = New Syncfusion.Windows.Forms.Grid.GridRangeInfoList()
I can see the selected part in the item "gridList". Always shows only the newly selected row. -> is there a fast way to find out if there is more than one row selected?
foreach (GridRangeInfo range in this.gridDataBoundGrid1.Selections.GetSelectedRows(true, false)) {
selectedRows += range.Bottom - range.Top + 1;
}
Console.WriteLine(selectedRows.ToString());
}
Let me know if this helps.
Regards, Jisha
MSMr. Sascha WaldJuly 14, 2009 11:12 AM UTC
Sorry, doesn't work here. When I select a row and expand the selection with the keyboard, it returns always "1" (the newly added selection and not the whole selection-range).
regards sascha
JJJisha Joy Syncfusion Team July 15, 2009 10:09 AM UTC
Hi Sascha,
Thank you for your update.
Instead of using the GetSelectedRows, try using GetSelectedRanges method and let me know if this helps.
See the code: private void button1_Click(object sender, EventArgs e) { int selectedRows = 0;
GridRangeInfoList list= new GridRangeInfoList(); this.gridDataBoundGrid1.Selections.GetSelectedRanges(out list, true); foreach (GridRangeInfo range in list) {