jQWidgets Forums

jQuery UI Widgets Forums Grid jqxGrid doesn`t show records

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • jqxGrid doesn`t show records #55112

    Huseyn
    Participant

    $(document).ready(function () {
    // prepare the data
    var theme = ‘classic’;
    var source =
    {
    datatype: “json”,
    datafields: [
    { name: ‘number_n’, type: ‘int’ },
    { name: ‘surname’, type: ‘string’ },
    { name: ‘name’, type: ‘string’ },
    { name: ‘father_name’, type: ‘string’ },
    { name: ‘date_b’, type: ‘date’ },
    { name: ‘place_b’, type: ‘string’ },
    { name: ‘blood’, type: ‘string’ },
    { name: ‘adres’, type: ‘string’ },
    { name: ‘issued’, type: ‘string’ },
    { name: ‘date_i’, type: ‘date’ },
    { name: ‘date_e’, type: ‘date’ },
    { name: ‘categories’, type: ‘string’ },
    { name: ‘special’, type: ‘string’ }
    ],
    url: ‘Responsedbo’,
    root: ‘Rows’,
    beforeprocessing: function (data) {
    source.totalrecords = data[0].TotalRows;
    },
    sort: function () {
    // update the grid and send a request to the server.
    $(“#jqxgrid”).jqxGrid(‘updatebounddata’);
    }
    };
    var dataadapter = new $.jqx.dataAdapter(source);
    // initialize jqxGrid
    $(“#jqxgrid”).jqxGrid(
    {
    width: 600,
    source: dataadapter,
    theme: theme,
    autoheight: true,
    pageable: true,
    virtualmode: true,
    sortable: true,
    rendergridrows: function () {
    return dataadapter.records;
    },
    columns: [
    { text: ‘number_n’, datafield: ‘number_n’, width: 250},
    { text: ‘surname’, datafield: ‘surname’, width: 250},
    { text: ‘name’, datafield: ‘name’, width: 250},
    { text: ‘father_name’, datafield: ‘father_name’, width: 250},
    { text: ‘date_b’, datafield: ‘date_b’, width: 250,cellsformat: ‘dd.MM.yyyy’},
    { text: ‘place_b’, datafield: ‘place_b’, width: 250},
    { text: ‘blood’, datafield: ‘blood’, width: 250},
    { text: ‘adres’, datafield: ‘adres’, width: 250},
    { text: ‘issued’, datafield: ‘issued’, width: 250},
    { text: ‘date_i’, datafield: ‘date_i’, width: 250,cellsformat: ‘dd.MM.yyyy’},
    { text: ‘date_e’, datafield: ‘date_e’, width: 250,cellsformat: ‘dd.MM.yyyy’},
    { text: ‘categories’, datafield: ‘categories’, width: 250},
    { text: ‘special’, datafield: ‘special’, width: 250}
    ]
    });
    });

    “Rows”:
    [

    ]
    What is the problem there.Help me!

    jqxGrid doesn`t show records #55119

    Peter Stoev
    Keymaster

    Hi Huseyn,

    To learn how to data bind jqxGrid, look at: http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-datasources.htm and check your server’s scripts as well.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.