We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Persisting changes to server from ejTreeGrid (cell edit or row drag-drop)

Any pointer to making this work?
I am trying to use a remoteSaveAdaptor/UrlAdaptor et. al., but have no success getting the datamanager/adaptor to forward changes to the server.


3 Replies

MK Mahalakshmi Karthikeyan Syncfusion Team May 20, 2015 11:21 AM UTC

Hi Jimmy,

Sorry for the inconvenience caused.

We would like to let you know that we can load remote data source to the TreeGrid control using ejDataManager with the help url in Javascript. Currently there is no support to update the changes to the remote Data Source using remoteSaveAdaptor/ UrlAdaptor.

We have also prepared a sample to render the treegrid with remote datasource using url. You can find the sample under the following location.

Sample: http://www.syncfusion.com/downloads/support/forum/119184/TreeGridDataManager101609140.zip

Hence we have also logged a feature regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Please let us know if you require further assistance on this.

Regards,

Mahalakshmi K.



JT Jimmy Toenners May 22, 2015 03:27 PM UTC

Thank you - I already had remote loading of data working fine. 
The real requirement I have is that any changes made to the data in the treegrid (either editing in cells or by re-ordering nodes) needs to be sent to a server for processing. It seems like a fair assumption that you might have thought that into the control. Is there some way of getting changed nodes out and sending the raw json back to the server for processing? Also I have noticed the parent node id is not updated when using the (very nice) drag-drop functionality. 
Please confirm that the treegrid in its current state is really a read-only presentation control rather than something meant for editing data - if I am wrong please point me to a working sample of getting changes made to the data out in a reasonable format such as json.


MK Mahalakshmi Karthikeyan Syncfusion Team May 25, 2015 01:26 PM UTC

Hi Jimmy,

Query 1: I have is that any changes made to the data in the treegrid (either editing in cells

Solution:

We would like to let you know that we can get the edit data from the “endEdit” client side event. Please refer the below code snippet to get the edited data from the event.

$("#TreeGridContainer").ejTreeGrid({

//…

endEdit: endEdit,

});


function endEdit(args) {

//get particular edited row in below variable.

var record = args.data

//get the whole json data in the below variable.

var data = args.model.dataSource;

}


Query 2: I have is that any changes made to the data in the treegrid (either editing in cells or by re-ordering nodes

Solution: we would like to let you know that we can get the changed nodes details in the actionComplete client side event. Please refer the below code snippet for getting the modified data while doing drag and drop.

$("#TreeGridContainer").ejTreeGrid({

//…

actionComplete: "actionComplete",

});


function actionComplete(args) {

// get the changed nodes from the below variable.

if (args.requestType == "dragAndDrop")

var datasource = args.model.dataSource;

}

You can post these modified json data to the remote server.

We have also prepared a sample based on your requirement and please find the sample under the following location.

Sample:http://www.syncfusion.com/downloads/support/forum/119184/Remotedata-2117807494.zip

Please let us know if you need more assistance on this.

Regards,

Mahalakshmi K.


Loader.
Live Chat Icon For mobile
Up arrow icon