jQWidgets Forums
Forum Replies Created
-
Author
-
December 10, 2015 at 9:55 am in reply to: unable to convert saveLayout method returned result to string unable to convert saveLayout method returned result to string #79178
It is possible to use JSON.stringify if you use a censor function to strip out the properties that cause the circular reference.
i.e.
function censor(key, value) { if(key.slice(0, 1) == "_") { return undefined; } return value; } var layout = JSON.stringify($('#dockinglayout').jqxDockingLayout('saveLayout'), censor); // Generates a string representing the layout
The layout can then be restored using
$('#dockinglayout').jqxDockingLayout('loadLayout', JSON.parse(layout)); // Parses the string and restores the layout
November 11, 2015 at 10:14 am in reply to: Incorrect drop target when dragging rows from one grid to another Incorrect drop target when dragging rows from one grid to another #77993Ok. I was trying to get it to drag the whole row rather than single cells but I can restrict it to the first cells of the rows and that seems to work. Thanks.
August 30, 2013 at 3:13 pm in reply to: Programmatically changing a column width Programmatically changing a column width #28070Yes, thanks..’auto’ is working nicely…
July 15, 2013 at 9:51 am in reply to: Export failing in virtual mode with pagination Export failing in virtual mode with pagination #25156Hi Peter,
So let’s assume that we’ve navigated to page 2, with a page size of 10 and therefore I get back an array of items with the indexes 10, 11, 12, 13, 14, 15, 16, 17, 18, 19. I then try to export this page and the export functionality eventually ends up in the exportContent function of jsqdata.export.js which has a for (;;) loop starting at 0 – and it fails. I’m guessing that if this was a forEach loop or started at the lowest array index, then it would work fine. My users would be able to export and print page n (I’m printing a grid by exporting to HTML and printing the output).
At the end of the day, by the time the export code runs it’s already retrieved the data so that’s fine. It’s how the data is processed by the export that’s causing the error…
function exportContent(exporter) {
exporter.beginBody();
for (var i = 0; i < data.length; i += 1) {
exportRow(exporter, data[i], i);
}
exporter.endBody();
}I think it's worth a look to see if it can be fixed. Otherwise I've got to disable printing and exporting for anything other than the first page.
Regards,
Alan Faux
July 12, 2013 at 12:43 pm in reply to: Export failing in virtual mode with pagination Export failing in virtual mode with pagination #25094Hi,
Ok…a little confused. I understand there’s a virtual mode where requests for data are made as the user scrolls through the grid, but here we’re doing server side pagination. We’ve retrieved our records for page (n) and they’re in the grid. There’s no more data to retrieve.
Isn’t there a difference between a virtual mode with pagination (server side pagination) and a virtual mode without? I can understand the issue with data requests on demand but when it’s paginated there are no data requests on demand…
Thanks.
April 11, 2013 at 10:12 am in reply to: clearfilters with asp.net webservice clearfilters with asp.net webservice #19053I hit this problem also but specifying the false parameter didn’t work. Tracing through the code I found the condition:
if (apply == true || apply != undefined) {
this.applyfilters();
}where “apply” is the “false” argument specified in the ‘clearfilters’ call. If “apply” is false then it’s not undefined and it applies the filters anyway.
I’ve worked round the problem it by passing “undefined”. i.e.
$(‘#jqGrid’).jqxGrid(‘clearfilters’, undefined);
and then forcing a refresh on the grid data afterwards.
-
AuthorPosts