jQWidgets Forums

jQuery UI Widgets Forums Grid createwidget and initWidget in edit mode

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

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

  • jahnvi25
    Participant

    i have issue where if i use columntype = ‘input’ with textbox.. when user tries to click on cell to edit.. grid scrolls.. but if i used createWidget it does not happen.. so my question is how can i use createWidget to edit the cell..

    i tried `
    createwidget: function (row, column, value, htmlElement) {
    var input = $(‘<input type=”text” class=”.customClick”/>’);
    input.keyup(function(e){
    //put cell in edit mode
    $(“#strikeOptGrid”).jqxGrid(‘begincelledit’, row, column);
    });
    $(htmlElement).append(input);
    }
    `
    but i am getting
    Uncaught TypeError: Cannot read property ‘columntype’ of null
    and if i try to use ‘setcellvalue’ method.. then i am getting
    Uncaught TypeError: Cannot read property ‘displayfield’ of null

    any help please..


    Peter Stoev
    Keymaster

    Hi jahnvi25,

    The createwidget is used to display a widget within a cell. It is not for editing. for editors, you have different GRID API and different types of editors. createeditor, initeditor GRID functions are used there.

    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.