jQWidgets Forums
Forum Replies Created
-
Author
-
December 15, 2014 at 10:55 pm in reply to: Strange problem with dates in jqx grid with Safari on Mac Strange problem with dates in jqx grid with Safari on Mac #64224
I wonder if this is a bug in jqxGrid (albeit one not introduced by you guys)?
We have also found that having Firebug open can cause grid updates to take a long time.
Thanks for the reply. That worked brilliantly. 600+ records updated and refreshed in under 1 second. We also used this technique to speed up the initial display of the grid when retrieving records from the server.
We changed viewModel.updateExportToXero to be
viewModel.updateExportToXero = function () {
dataAdapter.beginUpdate();
ko.utils.arrayForEach(this.items(), function (item) {
item.ExportToXero(true);
}
dataAdapter.endUpdate();
}FYI, the code I put in the initial post was an untested cut down version of what we are actually using. I noticed that I hadn’t declared the dataadapter in the above code, which I thought I’d correct here for the benefit of anyone else looking at this who is new to jq Widgets.
viewModel.updateExportToXero = function () {
ko.utils.arrayForEach(this.items(), function (item) {
item.ExportToXero(true);
}
}viewModel.createJqxGrid = function () {
var dataSourceInvoices = {
localdata: viewModel.items,
datafields: [
{ name: ‘ExportToXero’ },
{ name: ‘OkToExport’ },
{ name: ‘InvoiceNumber’ },
],
datatype: ‘observablearray’
}var invoiceColumns = [
{ text: ‘Export’, dataField: ‘ExportToXero’, editable: true, width: 50, columntype: ‘checkbox’},
{ text: ‘Invoice#’, dataField: ‘InvoiceNumber’, editable: false, width: 80},
{ text: ‘Date’, dataField: ‘InvoiceDate’, editable: false, cellsformat: ‘d’, width: 100 },
];var dataAdapter = new $.jqx.dataAdapter(dataSourceInvoices);
$(‘#jqxgrid’).jqxGrid({
source: dataAdapter,
width: ’100%’,
columns: gridColumns,
height: 500,
theme: ‘ui-redmond’,
editable: true,
sortable: true,
columnsresize: true,
showaggregates: true,
showstatusbar: true,
statusbarheight: 30,
selectionmode: ‘singlerow’
});
}viewModel.updateExportToXero = function () {
dataAdapter.beginUpdate();
ko.utils.arrayForEach(this.items(), function (item) {
item.ExportToXero(true);
}
dataAdapter.endUpdate();
} -
AuthorPosts