jQuery UI Widgets › Forums › ASP .NET MVC › 2 sorting problems with bound grid
This topic contains 1 reply, has 2 voices, and was last updated by Peter Stoev 4 years, 11 months ago.
-
Author
-
Hi there,
found a strange behaviour: if the bound data is empty (no data rows) and there is a default sorting defined in ready function this leads to an error in javascript.
Second issue: adding a row to the grid basically works fine but if there is an active (default) sorting by one or more columns, the cells in the new row won’t be editable until all sortings are removed.
The grid is defined as follows:
$("#myBoundgrid").jqxGrid( { width: "99%", height: "99%", source: dataAdapterSampleData, localization: getLocalization(), altrows: true, sortable: true, sortmode: "many", filterable: false, groupable: false, columnsreorder: false, columnsresize: true, columnsautoresize: false, showtoolbar: false, toolbarheight: 0, showstatusbar: false, statusbarheight: 0, showaggregates: false, autoshowloadelement: false, autosavestate: false, editable: true, editmode: 'selectedcell', theme: theme, ready: function () { //$("#myBoundgrid").jqxGrid('sortby', 'Name'); $('#myBoundgrid').jqxGrid('autoresizecolumns'); }, rendered: function () { $('#myBoundgrid').jqxGrid('autoresizecolumns'); }, columns: [ { text: 'ID', datafield: ',ID', hidden: true }, { text: 'Type', datafield: 'Type', columntype: 'dropdownlist', width: 500, createeditor: function (row, column, editor) { editor.jqxDropDownList({ autoDropDownHeight: true, source: myTypes }); } }, { text: 'Important', datafield: 'Important', columntype: 'checkbox', width: 50 }, { text: 'First String', datafield: 'String1', width: 500 }, { text: 'Second String', datafield: 'String2', width: 500 } ] });
New rows are added with these lines of code:
var row = {};row[“ID”] = null;
row[“Type”] = null;
row[“Important”] = false;
row[“String1”] = null;
row[“String2”] = null;$(“#myBoundgrid”).jqxGrid(‘addrow’, null, row);
How can these problems be solved?
Thanks in advance for any hint.Hi NightWizzard,
Thank you for the bug report. We will resolve these for jQWidgets ver. 9.0.0 which will be available in the first week of 2020
Regards,
Peter -
AuthorPosts
You must be logged in to reply to this topic.