EasyUI Forum
September 13, 2025, 04:31:15 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 can trigger on change and set value for rows of propertygrid?  (Read 10253 times)
contestant
Newbie
*
Posts: 40


View Profile Email
« on: August 14, 2015, 02:49:33 PM »

Hi
How do I can onChanged row value in propertygrid
And how do I can set new value for a costume row of propertygrid

For example set "width" row when I resized an element.

Thanks a lot Smiley
Logged
contestant
Newbie
*
Posts: 40


View Profile Email
« Reply #1 on: August 15, 2015, 08:06:45 AM »

There is no answer for me?!  Huh Huh Huh

I found a solution, But its not perfect.

My Solution:
var properties = $("#tt").datagrid('getRows');
$.each(properties, function( index, value ) {
                    if(value['idname'] == "width")
                        value['value'] = $($this).css("width").replace(/[^-\d\.]/g, '');
                    else if(value['idname'] == "height")
                        value['value'] = $($this).css("height").replace(/[^-\d\.]/g, '');
                });
$("#tt").datagrid('loadData', properties);
Please give me a better solution, Thanks.
Logged
CLKG
Guest
« Reply #2 on: August 16, 2015, 07:30:18 PM »

maybe you should use $('#tt').datagrid('updateRow', {}), but you need to gene the idx of rows when the data is loaded, and if showGroup=true, a re-index is needed after the data is loaded.
Logged
contestant
Newbie
*
Posts: 40


View Profile Email
« Reply #3 on: August 17, 2015, 04:47:23 AM »

Hi
Thanks my friend.
I use this both ways, But the my first way is faster than your way with updateRow, Because you need row index of row for updating.
Have a good time  Wink
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!