EasyUI Forum
May 17, 2024, 07:18:42 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: propertygrid, updateRow and getChanges problem  (Read 9394 times)
Fabrice
Jr. Member
**
Posts: 62


View Profile
« on: August 26, 2014, 09:24:16 AM »

I need to change value of propertygrid cell when i click on a button, i use updateRow method, but if i call getChanges method after this, i don't see the cell modified by program in the list.
Can you tell me if it's a problem or if i must do otherwise?

Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: August 26, 2014, 08:24:21 PM »

The 'getChanges' method reruns only those rows where the user has edited by calling 'beginEdit' and 'endEdit' methods. The 'updateRow' method does not affect the result set of the 'getChanges' method.
Logged
Fabrice
Jr. Member
**
Posts: 62


View Profile
« Reply #2 on: August 27, 2014, 03:01:18 AM »

I understand,
But for example if I have a property called 'type' with values possibles 'text' or 'image', I want when the user changes this property, another property called 'content' is set to ''.
In my case, the first property in getchanges appears well, but not the second.
I created a propertygrid_change function (field, value) that manages an array of changes in parallel of getchanges, it would have been nice, the updateRow function handles getchanges when the value is changed.
Logged
hande89
Jr. Member
**
Posts: 56


View Profile
« Reply #3 on: July 29, 2015, 02:26:12 AM »

The 'getChanges' method reruns only those rows where the user has edited by calling 'beginEdit' and 'endEdit' methods. The 'updateRow' method does not affect the result set of the 'getChanges' method.

For me this seems like a bug... The same thing happens when trying to append a row to treegrid, example http://www.jeasyui.com/easyui/demo/treegrid/editable.html

Code:
var node = {"id":11,"name":"Marketing","persons":5,"begin":"4/1/2010","end":"5/1/2010","progress":40};
$('#tg').treegrid('append',{data:[node]});
$('#tg').datagrid('getChanges','inserted'); // returns empty array
$('#tg').treegrid('getChanges','inserted'); // this does not work either, empty array

I have to force it like this:

Code:
$('#tg').data().datagrid.insertedRows.push(node);

No matter if I call beginEdit, endEdit. With datagrid appendRow the getChanges method returns correct values, with updateRow does not.
« Last Edit: July 29, 2015, 02:36:36 AM by hande89 » Logged
frankgao
Jr. Member
**
Posts: 53


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

Is this problem have good solution?
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!