jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList DropDownList Save Value

This topic contains 2 replies, has 2 voices, and was last updated by  wsundet 7 years, 4 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • DropDownList Save Value #98086

    wsundet
    Participant

    I am using jqxGrid with column editors that use jqxDropDownList editor. When an item is chosen in the DropDownList and a keyboard is being used, hitting the Enter key saves the value in the cell.

    With an iPad or iPhone, you must tap the grid in order for the value to be saved. Is there a way to automatically save the value as soon as it is chosen from the DropDownList. I am trying to reduce complexity by eliminating screen clicks? Thank you.

    DropDownList Save Value #98108

    Hristo
    Participant

    Hello wsundet,

    I would like to suggest you an approach that you bind the editor to “select” event in the createeditor callback.
    Then use close the DropDownList and focus the Grid and also – endcelledit. Please, take a look at this example:

    {
                          text: 'Product', columntype: 'dropdownlist', datafield: 'productname', width: 195,
                          createeditor: function (row, cellvalue, editor) {
                              editor.jqxDropDownList({ width: 120 });
    
                              editor.on('close', function (event) {
                                  setTimeout(function () {
                                    $("#grid").jqxGrid('endcelledit', row, "productname", false);
                                  }, 0)
                              });
                          }
                      }

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

    DropDownList Save Value #98343

    wsundet
    Participant

    Thank you, it works perfectly!!!
    wsundet

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

You must be logged in to reply to this topic.