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.
Hai ,
I am using GDBG and a context menu associated with it and has one column,I want to get the numbers of rows selected wwhen I perform the following steps .
1.Click on second row
2.Click on the 8 th row by pressing Shift ,i.e., Shift+Click
Now how can I get the no: of rows selected .
Thanks and Regards,
ADAdministrator Syncfusion Team September 9, 2004 05:13 AM UTC
You can get the GridRangeInfoList of selected row ranges using grid.Selections.GetSelectedRows. From there you can get the active range, and retrieve its height.
GridRangeInfo range = this.gridDataBoundGrid1.Selections.GetSelectedRows(true, false).ActiveRange;
if(!range.IsEmpty)
{
Console.WriteLine("height: {0}", range.Height);
}
ARarvindSeptember 13, 2004 02:39 AM UTC
Hai,I think U did''t get my problem .the piece of code sent me will work if he selects from the row numbers but if the user selects within the cell then the range count will be 0.
Please do the following steps to find out my pro.
1.Click on one cell.
2.SHIFT+Click on other cell after some rows in the same column .
3.we will get some rows selected rows.
4.Now I want the number of rows selected.
>You can get the GridRangeInfoList of selected row ranges using grid.Selections.GetSelectedRows. From there you can get the active range, and retrieve its height.
>
>
>GridRangeInfo range = this.gridDataBoundGrid1.Selections.GetSelectedRows(true, false).ActiveRange;
>if(!range.IsEmpty)
>{
> Console.WriteLine("height: {0}", range.Height);
>}
>
ADAdministrator Syncfusion Team September 13, 2004 04:54 AM UTC
Here is a KB that explains how you can retrieve arbitrary selections.
http://www.syncfusion.com/Support/article.aspx?id=564
If you have a single range of cells selected, you can get its height using
int height = this.grid.Selections.Ranges.ActiveRange.Height;