EasyUI Forum
May 16, 2024, 07:12:53 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 Example Save Values  (Read 11739 times)
rumbleDom
Newbie
*
Posts: 2


View Profile
« on: January 05, 2013, 02:25:51 AM »

Hello,

can somebody give an example to save values from a propertygrid?
Thanx a lot.

Regards, rumble
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 05, 2013, 02:41:51 AM »

The simple way to save changed value is to process the 'onAfterEdit' event. The code snippets look like this.
Code:
$('#pg').propertygrid({
onAfterEdit:function(index,row){
$.post(yoururl,row,function(result){
});
}
});
Logged
iceh
Jr. Member
**
Posts: 61


View Profile
« Reply #2 on: October 04, 2013, 04:16:31 AM »

Hi stworthy,

this doesn't work for me with the most recent svn version.

I added this into the propertygrid.html file:

Code:
		$('#pg').propertygrid({
onAfterEdit:function(index,row){
alert('onAfterEdit');
}
});
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: October 04, 2013, 05:04:58 AM »

Please refer to this example http://jsfiddle.net/W5LmQ/, it works fine.
Logged
iceh
Jr. Member
**
Posts: 61


View Profile
« Reply #4 on: October 04, 2013, 05:22:08 AM »

Thank you!

I put a $('#pg').ready() wrapper around my code. Now it works.

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!