jQWidgets Forums

jQuery UI Widgets Forums Grid How to access row attribute

Tagged: ,

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • How to access row attribute #22105

    matzgroup
    Member

    Dear Team,
    I am using XML source and have framed the following XML:
    [Entities]
    [Entity EntityID=”100″]
    [Name]xyz[/Name]
    [/Entity]
    [Entity EntityID=”200″]
    [Name]abc[/Name]
    [/Entity]
    [/Entities]

    The entity records are being displayed in the grid. Since each Entity is one “row” of data, in the cellrenderer I want to access the “row” i.e. Entity attribute “EntityID” value. How to I access the row’s attribute value? Can anyone help me on this?

    my code:
    var cellsrenderer = function (row, column, value) {
    var entityId = $(“#jqxgrid”).jqxGrid(‘getrowdata’, row).EntityID;
    return ‘‘ + value + ‘‘;
    }
    The above code is saying entityId value as “undefined”. How to get the value of the attribute EntityID?

    Please help!

    Sunil

    How to access row attribute #22121

    Peter Stoev
    Keymaster

    Hi,

    If you specified in your source object that EntityID is “id”, then to get the ID of a row, use the “getrowid” method.

    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.