jQWidgets Forums

jQuery UI Widgets Forums Grid Getting columns and rows from jqx grid

Tagged: 

This topic contains 3 replies, has 3 voices, and was last updated by  palaskarvidya 11 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Getting columns and rows from jqx grid #30141

    Hi,

    I am using jqwidget grid and I am passing columns and rows dynamically to the grid. And on click of save button I am fetching all the rows  using api –  $(‘#jqxgrid’).jqxGrid(‘getrows’);

    However my problem is, I also needed column names. I have tried with api – exportdata in json format which is giving me what exactly I wanted, but it is in downloable file format.

    How can I get the rows and columns directly in one of the variable instead of in a file?

    Waiting for soonest reply

    Thanks,

    Vidya

     

    Getting columns and rows from jqx grid #30171

    econcept
    Member

    How to get all the row values in grid ?any code please

    Getting columns and rows from jqx grid #30180

    Peter Stoev
    Keymaster

    Hi econcept,

    “getrows” returns an Array of the Rows displayed in the Grid. To access a value of a row, you can do that:

    var rows = $("grid").jqxGrid('getrows');
    var firstRow = rows[0];
    var cellValue1 = firstRow.FirstName;

    In the above code FirstName is the name of a data field i.e the value of the “datafield” property of a Grid column.

    Best Regards,
    Peter Stoev

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

    Getting columns and rows from jqx grid #30199

    Hi econcept,

    Here is the code I am using to get all rows in a grid-

    var rows = $(‘#jqxgrid’).jqxGrid(‘getrows’);
    var str = JSON.stringify(rows);
    alert(str);

    Can any on help me to get all the rows and columns in a grid once in a one json or array object?

    Thanks & Regards,
    Vidya Palaskar

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

You must be logged in to reply to this topic.