jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: jgrid call again not display jgrid call again not display #30317

    TrungTran
    Member

    TrungTran
    Hi All,

    – I study jqwidgets. I using jgrid. But not problem show data.

    – Step I call function load jgrid it work. After I call function other load data to $(‘#jqxgrid’).html(‘hello’).

    – And after I call function load jgrid again. then it not work.

    – Please help.

    See code :

    -$(document).ready(function () {
    data();
    });
    function data()
    {
    var theme = getDemoTheme();
    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘CompanyName’},
    { name: ‘ContactName’},
    { name: ‘ContactTitle’},
    { name: ‘Address’},
    { name: ‘City’}
    ],
    url: ‘grid_data.php’,
    cache: true,
    async: true
    };

    var dataAdapter = new $.jqx.dataAdapter(source);

    $(“#jqxgrid”).jqxGrid(
    {
    source: source,
    theme: theme,
    columns: [
    { text: ‘Company Name’, datafield: ‘CompanyName’, width: 250},
    { text: ‘ContactName’, datafield: ‘ContactName’, width: 150 },
    { text: ‘Contact Title’, datafield: ‘ContactTitle’, width: 180 },
    { text: ‘Address’, datafield: ‘Address’, width: 200 },
    { text: ‘City’, datafield: ‘City’, width: 120 }
    ]
    });

    }
    function datahtml()
    {
    $(‘#jqxgrid’).html(‘hello’);
    }

Viewing 1 post (of 1 total)