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

[Solved] Only one row selected at a time?

3 Answers 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martin
Top achievements
Rank 1
Martin asked on 27 Sep 2010, 04:08 PM
Hi,

I have a hierachical database. However it is possible to select the parent row AND the child row and after selecting there is no way to deselect it.
How can I archive to

1) Let the user only select ONE row (child or parent)
 or
2) Let the user deselect selected rows

I tried to do it by code but I ran into some problems (e.g. selecting 2 rows from 2 different childgrids).

Martin

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 28 Sep 2010, 03:48 PM
Hello Martin,

If you set the SelectionMode to Multiple you should be able to deselect the row.
Also, you can subscribe to the SelectionChanged event which fires each time a row is selected and manipulate the SelectedItems collection of RadGridView.

Hope this will get you started.

Best wishes,
Veselin Vasilev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Martin
Top achievements
Rank 1
answered on 29 Sep 2010, 07:31 AM
Ok,

I tried that. It works fine for the parent grid. However it does not work for the child grid. I can select 100 childs and it does not matter. The event does fire, but can you show me how I can manipulate the child grids? How can I select which child to manipulate?

Thanks,

Martin
0
Maya
Telerik team
answered on 01 Oct 2010, 12:21 PM
Hi Martin,

You may take a look at this forum thread for further reference.
 

Regards,
Maya
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Martin
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Martin
Top achievements
Rank 1
Maya
Telerik team
Share this question
or