EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rumbleDom on January 05, 2013, 02:25:51 AM



Title: PropertyGrid Example Save Values
Post by: rumbleDom 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


Title: Re: PropertyGrid Example Save Values
Post by: stworthy 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){
});
}
});


Title: Re: PropertyGrid Example Save Values
Post by: iceh 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');
}
});


Title: Re: PropertyGrid Example Save Values
Post by: stworthy on October 04, 2013, 05:04:58 AM
Please refer to this example http://jsfiddle.net/W5LmQ/, it works fine.


Title: Re: PropertyGrid Example Save Values
Post by: iceh on October 04, 2013, 05:22:08 AM
Thank you!

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