jQWidgets Forums

jQuery UI Widgets Forums Grid get data of jqxgrid

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  Nick 12 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • get data of jqxgrid #12785

    Nick
    Member

    Hi

    I am trying to use the rowselection.htm sample provided for jqxgrid, using this file i would like to display the

    row data of the selected row
    in a as below format

    cell header : cell value
    cell header : cell value
    cell header : cell value
    cell header : cell value

    I have tried using the below sample but i couldn’t achieve it..

    $(‘#jqxgrid’).bind(‘rowselect’, function (event)
    {
    var args = event.args;
    var row = args.rowindex;
    var details = $(‘#jqxgrid’).jqxGrid(‘getrowdetails’, row);
    alert(‘ Row data … ‘ + details);

    });

    Kindly help me on fixing this issue.

    Regards
    Nick

    get data of jqxgrid #12790

    UJanke
    Member

    Hello Nick maybe this will help:

    $thegrid.on(‘rowselect’, function(event) {
    var args = event.args;
    var index = args.rowindex;

    alert( row.YourFirstDataField);
    alert( row.YourSecondDataField);

    }

    Greetings Uwe

    (I’m no’t a member of this realy great and fast support, but i think it’s ok if i answer)

    get data of jqxgrid #12792

    UJanke
    Member

    Oh sorry the complete code:

    $thegrid.on(‘rowselect’, function(event) {
    var args = event.args;
    var index = args.rowindex;
    var row = $thegrid.jqxGrid(‘getrowdata‘, index);

    alert( row.YourFirstDataField);
    alert( row.YourSecondDataField);

    }

    get data of jqxgrid #12802

    Nick
    Member

    Hi,

    Thanks for the reply.

    But my issue now is on how to display the row selected details. As the grid with column header are dynamic i.e every time they differ based on the grid chosen , so i am looking out on a generic solution of how to display the row selected details.

    On select of row in a Customer grid ==>
    I need to display a format Column header : Column value from the row as below.

    Customer Name : Nick
    Customer ID: 002
    Customer Dept: Sales
    Customer DeptCode: DT009

    On select of row in a Deparment grid ==>
    I need to display a format Column header : Column value from the row as below.

    Dept Name : Sales
    Dept ID: DT009
    Dept Region: Texas
    Dept RegCode: RC998

    Please help me out on how to display it as the above format in a table.

    Thanks and Regards
    Nick

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

You must be logged in to reply to this topic.