jQWidgets Forums

jQuery UI Widgets Forums Grid jqxDropDownList as cell editor problem

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqxDropDownList as cell editor problem #29712

    reblutus
    Blocked

    I have this grid that has one column which become a dropdown when editing. That works perfectly if the dropdown opens below the cell. But if the dropdown opens above the cell, if you move the mouse from the cell to the list, the list disapear/collapse, thus making it impossible to change the value with the mouse.

    How can I make this work?

    here is a sample of my grid declaration:

    $("#storesGrid").jqxGrid({
    theme:"s360",
    source:storeGridDataAdapter,
    altrows: true,
    columns: [
    /* many more columns */
    { text: '@Messages("stores.column.musicStation")', datafield: 'stationId', width:200, displayfield: 'station', columntype: 'combobox',
    cellsrenderer: editComboboxCellsRenderer,
    cellclassname: cellclass,
    createeditor: function (row, column, editor) {
    editor.jqxComboBox({source: availableStationsDataAdapter, displayMember: "name", valueMember: "id", autoOpen: true, theme:"s360"});
    },
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if(oldvalue == newvalue) {
    return oldvalue
    }
    var validValues = availableStationsDataAdapter.originaldata;
    for (var i = 0; i < validValues.length; i++) {
    var curValidValue = validValues[i];
    if(curValidValue.id == newvalue.value) {
    if(curValidValue.name == newvalue.label) {
    return newvalue;
    }else {
    return oldvalue
    }
    }
    }
    return oldvalue;
    }
    }
    ],
    width: "100%",
    height: "100%",
    groupable: true,
    editable: true,
    editmode:"click",
    sortable: true,
    showsortcolumnbackground: true,
    showfilterrow: true,
    filterable: true,
    selectionmode: 'none',
    rowdetails: true,
    columnsresize: true
    /* row detail code removed */
    /* status bar code removed */
    })
    jqxDropDownList as cell editor problem #29713

    Peter Stoev
    Keymaster

    Hi reblutus,

    Remove “autoOpen: true” and you will have no problem.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxDropDownList as cell editor problem #29723

    reblutus
    Blocked

    Indeed it works! The drawback is that you have to click twice on the cell to edit it. It would be preferable to only click once.

    jqxDropDownList as cell editor problem #29742

    Peter Stoev
    Keymaster

    Hi reblutus,

    You have to click twice to open the popup, not to open the editor. If you would like, you can use the “open” method to open the ComboBox editor in the “initeditor” callback function of the column.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.