We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Range Count

Thread ID:

Created:

Updated:

Platform:

Replies:

18783 Sep 9,2004 04:10 AM UTC Sep 13,2004 04:54 AM UTC WinForms 3
loading
Tags: GridControl
arvind
Asked On September 9, 2004 04:10 AM UTC

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,

Administrator [Syncfusion]
Replied On 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); }

arvind
Replied On September 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); >} >

Administrator [Syncfusion]
Replied On 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;

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;