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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GetSelectedRows and Full Table Selection

Thread ID:

Created:

Updated:

Platform:

Replies:

16719 Jul 22,2004 01:20 PM UTC Jul 23,2004 01:20 PM UTC WinForms 2
loading
Tags: GridControl
Justin Koh
Asked On July 22, 2004 01:20 PM UTC

I am using 2.0.5.1 and when I click in the upper left corner of a GridControl, all the table is selected. However, when I call GetSelectedRows(false,True) to get the rows (and also consider current cell, I get only one range, and the top and bottom of the range is 0. I would expect it to return rng.Top = 0 and rng.Bottom = number of rows. Is this intended behavior?

Administrator [Syncfusion]
Replied On July 22, 2004 01:38 PM UTC

Yes, this is by design. Each GridRangeInfo object has a RangeType member, and depending on the RangeType, the other members like Left, Right, Top and Bottom may be populated with valid values or not. But, again depending upon RangeType, some of these values may be meaningless. In the case when the RangeType is Table (as in this your case), none of the values can be used. If you want to force a GridRangeInfo object to have fully populated members, then use code like: range = range.Expand(1, 1, grid.RowCount, grid.ColCount); This will guarantee Top, Botton, Left and Right are populated as you expected.

Administrator [Syncfusion]
Replied On July 23, 2004 01:20 PM UTC

Thank you!

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

;