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

[Solved] Prevent Selection and RowDetails from property in ViewModel

1 Answer 125 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.
Alex Vasquez
Top achievements
Rank 1
Alex Vasquez asked on 17 Feb 2011, 04:05 PM
Hi Support,

Hope all is well!

I'm having a difficult time trying to prevent rows from being selected and RowDetails from being expanded based on a boolean property in my ViewModel.  I've tried various things like behaviors, etc...but just can't get it working.  Here's the scenario:

The RadGrid is populated with n number of items and each row has additional fields that get shown in a form contained in expanded RowDetails.  I'm currently using ToggleRowDetailsColumn, but that can change if we need to.  If the form in the RowDetails is being editied (user clicks an edit button) I'd like to prevent any RowDetails from being expanded in other rows and also prevent other rows from being selected until they either cancel out of editing the form (cancel button is clicked) or commit what they've changed.  Do you possibly have any sample code, that would demonstrate how to accomplish this, or any suggestions?

Thank you very much for your time.

Best regards,
Alex

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 17 Feb 2011, 04:17 PM
Hello Alex Vasquez,

You may handle the SelectionChanging event and cancel it while the RowDetails are edited. If you provide a boolean property for example which will be changed on finishing the editing of the RowDetails, you may check its value in the SelectionChanging event.

Kind regards,
Maya
the Telerik team
Tags
GridView
Asked by
Alex Vasquez
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or