jQWidgets Forums
Forum Replies Created
-
Author
-
January 18, 2016 at 4:13 pm in reply to: Piechart in a tab in a Window Piechart in a tab in a Window #80493
More info on this:
If I dismiss the window (press ESC) while the tool-tip is supposed to be visible (I can see the white triangle part of the tool-tip) then I see the tip just fine until it disappears on some timeout. This leads me to think it’s a z-order index problem for the tool-tip and it’s going behind the window.That didn’t quite work out as I had expected. When I advance to the next page then I need to know the
recordstartindex
of the grid because the row number is the row number from the data-set rather than the displayed row number.How can I get the
recordstartindex
?I found a solution and will share with everybody. If there’s a better way then please let me know. Inside
beforeprocessing
I save the data in source withsource.data=data;
then I added a cellsrendered.var source = { datatype: "json", datafields: [ { name: 'ED', type: 'string'}, { name: 'CUST_NUM', type: 'string' }, { name: 'NAME', type: 'string' }, { name: 'COMPANY', type: 'string' }, { name: 'BILL_ADDR1', type: 'string' }, { name: 'CITY', type: 'string' }, { name: 'STATE', type: 'string' }, { name: 'POST_CODE', type: 'string' } ], cache: false, url: 'customer_json.jsp', filter: function () { $("#jqxgrid").jqxGrid('updatebounddata', 'filter'); }, sort: function () { $("#jqxgrid").jqxGrid('updatebounddata', 'sort'); }, beforeprocessing: function (data) { if (data != null && data.length > 0) { source.data=data; source.totalrecords = data[0].totalRecords; } } }; var nameRenderer = function (row, columnfield, value, defaulthtml, columnproperties) { return "<b>" + source.data[row].LAST_NAME + "</b>, " + source.data[row].FIRST_NAME; } $("#customers").jqxGrid( { width: 1070, source: source, columnsresize: true, pageable: true, pagesize: 25, pagesizeoptions: ['10', '25', '50'], virtualmode: true, rendergridrows: function (obj) { return obj.data; }, columns: [ { text: 'Edit', datafield: 'ED', width: 60 }, { text: 'ID', datafield: 'CUST_NUM', width: 80, cellsalign: 'left' }, { text: 'Name', datafield: 'NAME', width: 190, cellsalign: 'left', cellsrenderer: nameRenderer }, { text: 'Company', datafield: 'COMPANY', width: 100, cellsalign: 'left' }, { text: 'Address', datafield: 'BILL_ADDR1', width: 100, cellsalign: 'left' }, { text: 'City', datafield: 'CITY', width: 100, cellsalign: 'left' }, { text: 'State', datafield: 'STATE', width: 100, cellsalign: 'left' }, { text: 'Postal Code', datafield: 'POST_CODE', width: 100, cellsalign: 'left' } ] });
-
AuthorPosts