jQuery UI Widgets › Forums › Grid › autosave-autoload breaks grid fluent size
Tagged: grid
This topic contains 3 replies, has 2 voices, and was last updated by svetoslav_borislavov 1 year, 1 month ago.
-
Author
-
The behaviors autosave(true)-autoload(true) not working correctly with fluent size in use. Affects column width and order.
—
var data = generatedata(500);
var source = {
localdata: data,
datafields: [{
name: ‘quantity’,
type: ‘number’
}, {
name: ‘price’,
type: ‘number’
}],
datatype: “array”
};var adapter = new $.jqx.dataAdapter(source);
$(“#jqxgrid”).jqxGrid({
width: “100%”,
theme: ‘energyblue’,
autoloadstate: true,
autosavestate: true,
source: adapter,
sortable: true,
columns: [{
text: ‘Quantity’,
datafield: ‘quantity’,
width: “50%”,
cellsalign: ‘right’
}, {
width: “40%”,
text: ‘Unit Price’,
datafield: ‘price’,
cellsalign: ‘right’,
cellsformat: ‘c2’
}, {
text: “”, width: “10%”, datafield: null, align: “center”, columntype: “button”, sortable: false, filterable: false, menu: false, exportable: false,
cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties, rowdata) {
return “button”;
}
}]
});Hi,
Can you share an example of the problem, I have reproduced the example, but could not face the problem:
https://jsfiddle.net/jqwidgets/X68HN/284/Best regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/Hi Svetoslav
In your example the problems are:
1. every column has width: 50%, 40% and 10%, but but the widths of the columns do not match the width of the table.
2. The last column is “button” type column, but the location is in the middle of the table columns.You can see the problem, if you comment in:
//autoloadstate: true,
//autosavestate: true,Best wishes,
Hi,
Thank you for reporting this, I have opened a work item for this!
The problem comes because the grid saves the state in the local storage and saves the widths of the columns in pixels, not in percentagesBest regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.