jQWidgets Forums
jQuery UI Widgets › Forums › Grid › available in ver 8.0.0 but not available in ver.8.1.4.
Tagged: #jqwidgets-grid, args, javascript grid, jquery grid
This topic contains 6 replies, has 3 voices, and was last updated by korea 5 years, 8 months ago.
-
Author
-
Hello jQWidgets Team,
i have a question.There is a problem updating the row in jqgrid.
Variables that were available in ver 8.0.0 are not available in ver.8.1.4.
It is the ‘agrs’ used in the addrow, updaterow and deleterow functions in datasouce.
It was object type in ver 8.0.0 but undefined in ver.8.1.4.var source = { localdata: data, datatype: "array", updaterow: function (rowid, rowdata, commit) { console.log(typeof args); commit(true); }, datafields: [ { name: 'firstname', type: 'string' }, { name: 'lastname', type: 'string' }, { name: 'productname', type: 'string' }, { name: 'available', type: 'bool' }, { name: 'quantity', type: 'number' }, { name: 'price', type: 'number' } ] };
http://jsfiddle.net/Luzwtfs9/2/
Best Regards by eom
Hello korea,
There is no args in these functions, in either of the two versions. There is args in the events callback function(event.args).
What is your idea? If you describe in more details your idea we would be able to help.
Best Regards,
TodorjQWidgets Team
https://www.jqwidgets.comHellow Todor
In ver 8.0.0 I got the grid ID with the following code.
var id = args.owner.element.id;And in the fiddle below, it is a sample that refers to ver8.0.0.
http://jsfiddle.net/rhpmL25q/1/
In ver8.0.0, agrs exists.
Please run jsfiddle example and reply againThanks
Hello korea,
Args is not a parameter in updaterow function:
updaterow: function (rowid, newdata, commit) { // synchronize with the server - send update command // call commit with parameter true if the synchronization with the server is successful // and with parameter false if the synchronization failed. commit(true); }
What is your idea of using args in updaterow ?
Best Regards,
TodorjQWidgets Team
https://www.jqwidgets.comHellow Todor
thank you for your reply.
Did you run the jsfiddle example I shared?
Once again share jsfiddle.
http://jsfiddle.net/rhpmL25q/1/
Do not just say it’s not a parameter.
Let me know why args is an object in ver8.0.0 but undefined in ver8.1.4.
Thanks
Dear korea,
var id = args.owner.element.id; is Invalid API in any version of jQWidgets. The fact that you try to use “args” in a function which does not have a parameter called “args” is a problem, too. The correct behavior is that “args” is undefined. If you want to get the Grid’s id, you can save it in an external variable and use it within the “updaterow” function.
Dear jQWidgets Team
Thank you very much.
I got it. -
AuthorPosts
You must be logged in to reply to this topic.