Hi all.
Well, my problem starts since I tried to do a grid with a subgrid. Already got it, a grid with another grid as a subgrid. I thought that the best way to edit the information that I recieve from the API server was to put a column with formatter: 'actions'. That offers me to edit each row as inline edit and another delete button, to simply delete that row.
I tried to send the edit and delete data serialized in JSON format. Had to search and search through internet… but I did not find anything useful. Not enough information through internet about how to do that. Atleast, I posted at StackOverflow my problem and Oleg helped me a lot.
He told me that to do that I need to add this at the beginning of my script.
$.extend($.jgrid.defaults, {
ajaxRowOptions: {contentType: “application/json”, dataType: “json”…},
serializeRowData: function(data) { delete data.oper; return JSON.stringify(data); }
});
That to send edited data inline serialized. Thats too hard to know. Someone could do something easier if possible…
Well, leaving this apart, Its supposed that if I have an inline editing, at formatoptions in actions column in my colModel, I could use editOptions: {…} to set properties for inline editing like URL. Already used delOptions{…} and could set an URL to send the id of the row deleted and could set the serializeDelData to send that row in JSON format, but for editing I use URL property at editOptions and it doesnt work. It uses the URL of the iframe which is located.
I dont know if it is clear, but I think that is a bug. I did not defined an editUrl or something that could make that jqGrid goes “crazy”.
If it is not a bug, I'd appreciate that someone gives me a solution.
If you need more information or need to clarify something, just ask me.
Thanks and greetings.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top