4 Answers, 1 is accepted
0
Hello Michael,
Please test the following approach:
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Please test the following approach:
| if(radGridClientObject._editIndexes.length > 0) |
| //edit mode |
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Tonino
Top achievements
Rank 1
answered on 02 Feb 2010, 04:07 PM
Hi Daniel
What would be the syntax to use for the 'classic' grid control?
Thanks,
Tonino.
What would be the syntax to use for the 'classic' grid control?
Thanks,
Tonino.
0
Hello Tonino,
You can traverse the rows and check their ItemType:
Best regards,
Daniel
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
You can traverse the rows and check their ItemType:
var mtable = window["RadGrid1"].MasterTableView;for(var rowNum = 0; rowNum < mtable.Rows; rowNum++){ if(mtable.Rows[rowNum].ItemType.indexOf("Edit") != -1) //this item is in edit mode}Best regards,
Daniel
the Telerik team
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Tonino
Top achievements
Rank 1
answered on 04 Feb 2010, 09:06 AM
Hi Daniel
Had to change
Here the complete code:
Thanks!
Tonino.
Had to change
mtable.Rows to
mtable.Rows.length in the for-loop, but now it works for update. To detect inserts I check IsItemInserted.Here the complete code:
| function AlertIfEditOrInsertMode() { |
| var mtv = window["RadGrid1"].MasterTableView; |
| if (mtv.IsItemInserted) { |
| alert('Terminate insert/update first!'); |
| return true; |
| } |
| for (var rowNum = 0; rowNum < mtv.Rows.length; rowNum++) { |
| if (mtv.Rows[rowNum].ItemType.indexOf("Edit") != -1) { |
| alert('Terminate insert/update first!'); |
| return true; |
| } |
| } |
| return false; |
| } |
Thanks!
Tonino.