jQWidgets Forums

Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Piechart in a tab in a Window Piechart in a tab in a Window #80493

    stollar
    Participant

    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.

    in reply to: Custom Cell Formatting? Custom Cell Formatting? #80318

    stollar
    Participant

    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?

    in reply to: Custom Cell Formatting? Custom Cell Formatting? #80293

    stollar
    Participant

    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 with source.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' }
        ]
    });
    
Viewing 3 posts - 1 through 3 (of 3 total)