jQuery UI Widgets › Forums › Grid › cellselect event has changed since v.20 of jqwidgets
This topic contains 3 replies, has 2 voices, and was last updated by admin 7 months, 2 weeks ago.
-
Author
-
on your documentation ( https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-cells-selection.htm ) you give this example to subscribe to cellselect event :
$(“#jqxgrid”).on(‘cellselect’, function (event) {
var datafield = event.args.datafield;
var row = event.args.rowindex;
var columntext = $(“#jqxgrid”).jqxGrid(‘getcolumn’, event.args.datafield).text;
});this code doesn’t work anymore, since v20 !!!
event.args is now an array, event.args.datafield doesn’t exist. (you have to transform it into : event.args[0].datafield )but the code still works with cellclick instead of cellselect :
$(“#jqxgrid”).on(‘cellclick‘, function (event) {
var datafield = event.args.datafield;
var row = event.args.rowindex;
var columntext = $(“#jqxgrid”).jqxGrid(‘getcolumn’, event.args.datafield).text;
});here is a fiddle, with 2 grids : the click in a cell of grid1 is OK, the click in a cell of grid2 creates a console error.
https://jsfiddle.net/mogador/9zfj8dv1/Is there a documentation, explaining which other functions does’nt work anymore since new version ?
thanx,
fabriceb
Hi Fabriceb,
The cellselect event’s behavior is changed intentionally based on the users feedback. This is documented in the release notes – https://www.jqwidgets.com/jquery-widgets-documentation/documentation/releasehistory/releasehistory.htm. The event is raised 1 time instead of multiple times and it returns an array in the event arguments, not a single value now.
Best regards,
Peter StoevjQWidgets team
https://www.jqwidgets.com/ok, I understood that, but your documentation is wrong since october 2024, you have to correct it. https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-cells-selection.htm your example is wrong now : $(“#jqxgrid”).on(‘cellselect’, function (event) { var datafield = event.args.datafield;
Hi Fabriceb, Thanks for the feedback! Best regards, Peter Stoev jQWidgets team https://www.jqwidgets.com/
-
AuthorPosts
You must be logged in to reply to this topic.