jQWidgets Forums

jQuery UI Widgets Forums Grid gridEditorValue

This topic contains 1 reply, has 1 voice, and was last updated by  EricK 11 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • gridEditorValue #54585

    EricK
    Participant

    Hi all.
    Can anyone tell me the return label code from a listbox. I can get the value but not the label.

    createGridEditor(…)

    editor.jqxDropDownList({

    var gridEditorValue = function (row, cellValue, editor) {
        if (row == 8) {
           alert('v:'+editor.val());
           alert ('l:'+editor.label)
           return {id:editor.val(),name:editor.label};                   
         }else{
          	return editor.val();
         }
     }
    

    I know the editor is returning an object, I just don’t know how to find the label?

    gridEditorValue #54593

    EricK
    Participant

    Answered my question.

    var gridEditorValue = function (row, cellValue, editor) {
    var rv = editor.jqxDropDownList(‘getSelectedItem’);
    if (row==8){
    return {id:editor.val(),name:rv.label};
    }else{
    return editor.val();
    }

    }

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

You must be logged in to reply to this topic.