jQWidgets Forums

jQuery UI Widgets Forums Grid set a different editmode for a specific cell

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 6 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author

  • aldo86
    Participant

    Hi,
    Is it possible to set a different editmode for a specif cell or write some code to achieve that? If I create a column with columntype dropdown I’ve to click on the cell 3 times before the dropdown will be open so I want to do that with 2 click: 1st select and show dropdown/editor 2nd open the dropdown/editor.

    Best Regards
    Aldo


    Peter Stoev
    Keymaster

    Hi Aldo,

    No, it is not possible to set a different edit mode for a specific cell. However, in the “initeditor” callback function of your column, you can call editor.jqxDropDownList(‘open’); to open the DropDownLsit automatically.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    aldo86
    Participant

    Hi,
    it seems a good idea so I’ve tried like this:

    columnsH.push({ text: val, datafield: i, columntype: 'dropdownlist', cellsrenderer: _this.cellsrenderer, width: _this.allWidths[i],
            				createeditor: function (row, value, editor) {
                                editor.jqxDropDownList({ source: _this.editors['all'][i], placeHolder: "Auswahl" });
                                
                            },
                            initeditor: function (row, cellvalue, editor, celltext, cellwidth, cellheight) {
                                editor.jqxDropDownList('open');
                            }
            			});

    but when the dropdown is open sometimes its content is not anchored to the field


    aldo86
    Participant

    Hi,
    Is it right the code above? Is it what you mean? Have you get the same problem?

    Best Regards


    Peter Stoev
    Keymaster

    Hi aldo86,

    The problem comes from the fact that initeditor is called before the editor is actually visible. The solution is to call the “open” method in a setTimeout function.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.