jQWidgets Forums

jQuery UI Widgets Forums Grid rendergridrows

This topic contains 1 reply, has 1 voice, and was last updated by  ScottNL 13 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • rendergridrows #4639

    ScottNL
    Member

    He pro’s,

    I need to add rendergridrows outside of standaard setup:

    exampel:

    $(“#jqxgrid”).jqxGrid(settings);
    $(“#jqxgrid”).jqxGrid(‘source’, source );
    $(“#jqxgrid”).jqxGrid(‘rendergridrows’, rendergridrows );
    $(“#jqxgrid”).jqxGrid(‘columns’, columns)

    This works for all except for rendergridrows . Please note that i am loading all settings via ajax/php.

    I found this out by trying this:

    $(“#jqxgrid”).jqxGrid(
    {
    width: 670,
    autoheight: true,
    source: source,
    theme: theme,
    virtualmode: true,
    pageable: true,

    columns: [
    { text: ‘menu_id’, datafield: ‘menu_id’, width: 50 },
    { text: ‘name’, datafield: ‘name’, width: 100 },
    { text: ‘Last Name’, datafield: ‘lastname’, width: 100 },
    { text: ‘Product’, datafield: ‘productname’, width: 180 },
    { text: ‘Quantity’, datafield: ‘quantity’, width: 70, cellsalign: ‘right’ },
    { text: ‘Unit Price’, datafield: ‘price’, width: 70, cellsalign: ‘right’, cellsformat: ‘c2’ },
    { text: ‘Total’, datafield: ‘total’, width: 100, cellsalign: ‘right’ }
    ]
    });

    $(“#jqxgrid”).jqxGrid(rendergridrows ); or $(“#jqxgrid”).jqxGrid(‘rendergridrows’, rendergridrows );

    this does not work

    this does work:

    $(“#jqxgrid”).jqxGrid(
    {
    width: 670,
    autoheight: true,
    source: source,
    theme: theme,
    virtualmode: true,
    pageable: true,
    rendergridrows: rendergridrows,
    columns: [
    { text: ‘menu_id’, datafield: ‘menu_id’, width: 50 },
    { text: ‘name’, datafield: ‘name’, width: 100 },
    { text: ‘Last Name’, datafield: ‘lastname’, width: 100 },
    { text: ‘Product’, datafield: ‘productname’, width: 180 },
    { text: ‘Quantity’, datafield: ‘quantity’, width: 70, cellsalign: ‘right’ },
    { text: ‘Unit Price’, datafield: ‘price’, width: 70, cellsalign: ‘right’, cellsformat: ‘c2’ },
    { text: ‘Total’, datafield: ‘total’, width: 100, cellsalign: ‘right’ }
    ]
    });

    Any ideas?

    rendergridrows #4641

    ScottNL
    Member

    Problem solved:

    $(“#jqxgrid”).jqxGrid({rendergridrows: rendergridrows});

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.