EasyUI Forum
May 13, 2024, 05:49:51 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: How to end edit all row at once?  (Read 6582 times)
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« on: April 27, 2015, 11:34:25 PM »

How to end edit all row at once? for example 3 of my rows were edited and of course its editable, now i want to end all of it, how can i do that? should i loop for every rows?

For example, I have 2 editable datagrid, and every row can be edited without end edit, now i want to end all editable rows in both datagrid by single click of a button, how i can do that? its possible to end all of editable rows in many datagrid by select it class? because i don't want to loop all datagrid .

Thank You in advance

fiddle :
http://jsfiddle.net/aswzen/2Leprrso/1/
« Last Edit: April 28, 2015, 03:53:49 AM by aswzen » Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
jdx100424
Newbie
*
Posts: 3


View Profile Email
« Reply #1 on: April 29, 2015, 02:16:24 AM »

var rows = $('#XX').datagrid('getRows');
for ( var i = 0; i < rows.length; i++) {
   $('#XX').datagrid('endEdit', i);
}   
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!