This is a migrated thread and some comments may be shown as answers.

Radgridview contiguous row selection

3 Answers 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 05 Dec 2011, 02:44 AM
Hi there,

I'm wondering if it's possible to setup the radgridview to allow users to either select a single row or a contiguous set of rows.

I'm not able to achieve this by setting SelectionMode to multiple or extended as these 2 settings will still allow a user to select a non-contiguous set of rows.

Thank you kindly.

Tony

3 Answers, 1 is accepted

Sort by
0
Accepted
Nick
Telerik team
answered on 07 Dec 2011, 04:34 PM
Hello Tony,

Unfortunately by default this is not among the features that we offer. However you can create a custom logic by hooking up to the SelectionChanged event of the GridView and check if the selected set is contiguous or not. 

Hope this helps!

Regards,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tyree
Top achievements
Rank 2
answered on 08 Dec 2011, 12:43 AM
Contiguous based on the current visual state (ie. a particular column is sorted, or combo of columns), or based on the underlying collection order? If you used an underlying collection that supported sorting (ie. CollectionView, CollectionViewSource) you would probably have a more reliable means of verifying they were continguous in all conditions.
0
Tony
Top achievements
Rank 1
answered on 08 Dec 2011, 04:37 AM
Thanks Nik.

I was hoping that there is some hidden setting but yep, worst case we were considering catching this in the underlying event.

Thanks also Tyree for the reply.  We plan to validate against the underlying collection :)
Tags
GridView
Asked by
Tony
Top achievements
Rank 1
Answers by
Nick
Telerik team
Tyree
Top achievements
Rank 2
Tony
Top achievements
Rank 1
Share this question
or