jQWidgets Forums

jQuery UI Widgets Forums Grid Show Row Number in column of grid

Tagged: ,

This topic contains 1 reply, has 1 voice, and was last updated by  Gopre400 11 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Show Row Number in column of grid #53788

    Gopre400
    Participant

    Hi I would like to show the row number as a column in a grid but do not want to use the spreadsheet view. Is there a way to do that?
    Will this work?
    { text: ‘Item #’, datafield: rowindex, width: 50 },

    Show Row Number in column of grid #53799

    Gopre400
    Participant

    I got it to work doing this…
    { text: ‘Item #’, datafield: ‘RowIndex’ , width: 50, cellsrenderer: rownumberrenderer },

    var rownumberrenderer = function (row, columnfield, value, defaulthtml, columnproperties, rowdata) {
    return row + 1;
    }

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

You must be logged in to reply to this topic.