EasyUI Forum
September 14, 2025, 12:21:09 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: change cell text without editor (datagrid)  (Read 10400 times)
iskandarkbr
Newbie
*
Posts: 36


View Profile Email
« on: March 10, 2015, 07:15:30 PM »

can we change the text of cell in datagrid?
 i want calculate two editor-field which the result place to non-editor-field
Logged
iskandarkbr
Newbie
*
Posts: 36


View Profile Email
« Reply #1 on: March 10, 2015, 07:39:40 PM »

i found that :

row.fieldResult=row.fieldA * row.fieldB

its simple indeed.

but, field fieldResult change after we endEdit the field
can we get the change for fieldResult automatically while we type number on editor ( i bind to keyup event)
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #2 on: March 10, 2015, 07:43:40 PM »

Please refer to http://www.jeasyui.com/forum/index.php?topic=1803.0
Logged
iskandarkbr
Newbie
*
Posts: 36


View Profile Email
« Reply #3 on: March 10, 2015, 08:01:35 PM »

the above topic assumed that all field has editor, in my case i dont put editor on the result field
Logged
iskandarkbr
Newbie
*
Posts: 36


View Profile Email
« Reply #4 on: March 10, 2015, 08:11:03 PM »

i solved it, but little bit tricky Smiley   Wink

row.resultField=editor*row.B
$("#dg").datagrid('endEdit', index);
$("#dg").datagrid('selectRow',index).datagrid('editCell',{index: index,field: currentFieldName});
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!