5 Answers, 1 is accepted
Do you mean to edit a single row? If this is the case there is not such a general property of each row.
May you please specify what exactly your scenario is?
Didie
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Hello Didie
The scenario is when I select specific row
I want that the user can't select other rows
So I do can user select == false
The problem is he can edit rows
So I need to prevent the edit in the other rows
Best regards
Ehud
Have you tried using IsReadOnlyBinding for the row of the RadGridView?
I am not sure if I understand what your scenario is. If the IsReadOnlyBinding does not solve your problem, may you please specify more about what your idea is? Are you editing the selected row, or are you just selecting it?
Didie
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
Hello Didie
Is read only binding is not good for this.
The user selects one Row and he can edit this row in the grid
Or in different view (like master details).
So as long the user edit this row he can't select other rows or edit them.
Can't select work, but the user can edit other rows (this is the problem).
Hope that's clear the scenario.
Best regards
Ehud
It would be difficult to provide an simple and general solution for that situation. The important key note here is how are you commiting the current edited row?
1. If you are commiting on 'Enter' click, then you may make all the not edited rows ReadOnly using these event handlers:
this
.clubsGrid.BeginningEdit +=
new
EventHandler<GridViewBeginningEditRoutedEventArgs>(clubsGrid_BeginningEdit);
this
.clubsGrid.RowEditEnded +=
new
EventHandler<GridViewRowEditEndedEventArgs>(clubsGrid_RowEditEnded);
this
.clubsGrid.RowLoaded +=
new
EventHandler<RowLoadedEventArgs>(clubsGrid_RowLoaded);
When you click 'Enter' the row will be committed and the next item will start to be edited. I have prepared a sample project to show this approach.
2. If you are committing on a button click, then you may subscribe to the RowValidating event of the RadGridView. Inside it you may set the row to be not valid until one of the accept/cancel editing buttons has been clicked. You may use a global variable (commandCalled) to save the state of the buttons' "click".
Is any of this approaches meeting your requirements?
Regards,
Didie
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!