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

Selecting a Row when an Edit Template is displayed

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steven
Top achievements
Rank 1
Steven asked on 07 Jun 2013, 04:33 PM
I have a RadGrid that contains an custom Edit Template (which can also be used for inserts). When the user has the edit template open, I need to prevent them from selecting another row of the grid until that edit is saved or canceled.  Is there a simple setting for this?  If not, I'm guessing I need to add client side code in the OnRowSelecting event.  How do I detect if the grid that the user clicked on has an edit or insert template showing?  How do I detect if a DIFFERENT grid on the same page has an edit or isnert template showing?

Thanks

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Jun 2013, 09:18 AM
Hi,

I'm sorry but i couldn't fully replicate the issue,but if u want the user to do one action at a time,that is edit or insert,you can use the following code to check if its in edit or insert mode.Add this to ItemCommand event.

C#:
if (e.CommandName == RadGrid.EditCommandName)
   {
      RadGrid1.MasterTableView.IsItemInserted = false;
   }
if (e.CommandName == RadGrid.InitInsertCommandName)
   {
      RadGrid1.MasterTableView.ClearEditItems();
   }

Thanks,
Princy
Tags
Grid
Asked by
Steven
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or