jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Editable – jqxDropDownList

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Grid Editable – jqxDropDownList #3543

    a.klinger
    Member

    Hello,

    I have a little problem with cell-edititing in grids. I have a grid with an colum for editing with jqxDropDownList. I create this dropdownlist with the initeditor and set source like {cid: “12”,name:”foobar”} and I set valueMember to “cid” and displayMember to “name” for the dropdownlist-editor. This works great. But If I read out the data of a row with .jqxGrid(‘getrowdata’,rowIndex) I get only the displayMember of the dropdownlist in the column, and not the valueMember. Can you helpe me?

    Thank you in advance,
    Adrian

    Grid Editable – jqxDropDownList #3544

    Peter Stoev
    Keymaster

    Hi Adrian,

    The getrowdata method returns the data record at a specific index. When you edit a cell with the DropDownList, the cell’s value is set to the display value of the DropDownList as in the built-in logic there’s only a display value and the list of items that the editor displays depends only on the Column’s datafield setting. If you need to get a value associated to a given displayed value, you need to keep a map between the value and the display value or use the DataAdapter’s records collection to get the record at a specific index.

    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.