jQuery UI Widgets Forums Grid textBox editor focus on grid

Tagged: , ,

This topic contains 5 replies, has 2 voices, and was last updated by  ivailo 9 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • textBox editor focus on grid #71078

    jahnvi25
    Participant

    i am using jqxInput as a editor for one of the columns.. but when user clicks on that cell.. it brings on editor mode.. but then when user clicks on different cell (without entering value in editable cell).. this textbox is still in focus… is there a way i can call focusout or something to take focus away from editing cell ?

    below is my code :
    function createEditor(row, cellvalue, editor, cellText, width, height){
    var inputElement = $(“<input style=’float:right;margin-top: 4px;border:1px solid #6F93B9;box-shadow: inset 0 0 2px 2px #E5E5E5;border-radius:0′ />”).prependTo(editor);
    var w = (width * 0.8);
    var h = (height * 0.8);
    inputElement.jqxInput({width: w, height: h});
    }
    function initEditor(row, cellvalue, editor, celltext, pressedkey){
    //set the editor’s current value. The callback is called each time the editor is displayed.
    var inputField = editor.find(‘input’);
    if (pressedkey) {
    inputField.val(pressedkey);
    inputField.jqxInput(‘selectLast’);
    }
    else {
    inputField.val(cellvalue);
    inputField.jqxInput(‘selectAll’);
    }
    }
    function qtyEditorValue(row, cellvalue, editor){
    return editor.find(‘input’).val();
    }

    textBox editor focus on grid #71103

    ivailo
    Participant

    Hi jahnvi25,

    Your presented code looks fine(it’s almost the same as the cellcustomediting demo.

    Try to upgrade to the last version 3.8.0 and if this doesn’t help attach a fiddle.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    textBox editor focus on grid #71124

    jahnvi25
    Participant

    here is the code.. which shows my situation.. steps to re-create
    fiddle link http://jsfiddle.net/uuW2H/219/
    1. run below code. (i modifiedbindingtoarray to my needs)
    2. quantity field is editable with ‘0’ as default value.. click on cell..to bring in edit mode.. then click backspace to delete that ‘0’ .. dont press any other key.. now click on firstname cell (which has cellclick event attached to it).. on the same row…you will notice that quantity cell is still in edit mode.. and its not even updating value which i am trying to set via clicking on firstname column cell..

    i you click any other row and click on first name.. qty cell will update value..

    how can i fix this..

    textBox editor focus on grid #71217

    ivailo
    Participant

    Hi jahnvi25,

    I made some changes to your code.
    You can see the final solution in this fiddle.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

    textBox editor focus on grid #71275

    jahnvi25
    Participant

    i created that sample program to our needs.. our requirement is such that we can not use numberinput(like in updated fiddle) as qty field editor and we have to allow ‘null’ as default value..or acceptable value.. in that case provided solution would not work..right ?

    Thanks

    textBox editor focus on grid #71338

    ivailo
    Participant

    Hi jahnvi25,

    You can use columntype: 'input' to allow ‘null’.
    Here is the fiddle.

    Best Regards,
    Ivailo Ivanov

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.