jQWidgets Forums

Forum Replies Created

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

  • martonx
    Member

    Peter,

    I need something like your second linked example. But I need added a feature, when I change the City in a combobox, or dropdown, the grid should change the Country column. I hope you understand what do I mean? When I change Lyon to Rio de Janeiro, the Country should change to Brasil from France.
    In my code, I do this, with those javascript error.
    Could you make an example for this?

    Thank you very much,

    Lajos


    martonx
    Member

    Hi Peter,

    I made a workaround, but it’s not 100%.

    { text: ‘Név’, datafield: ‘dname’, width: 200, columntype: ‘combobox’,
    createeditor: function (row, column, editor) {
    editor.jqxComboBox({ source: DolgozoAdapter, displayMember: “nev”, valueMember: “dszam” });
    editor.bind(‘select’, function (event) {
    var item = event.args.item;
    if (item) {
    TempValue = item.value; //TempValue is global variable
    }
    });
    },
    cellvaluechanging: function (row, column, columntype, oldvalue, newvalue) {
    if (newvalue == “”) return oldvalue;
    Grid.jqxGrid(‘setcellvalue’, row, “dnumber”, TempValue);
    }
    }

    It seems working, server side updates the database, just in the console I got this error: Uncaught TypeError: Cannot call method ‘focus’ of undefined.
    I think when I’m in edit mode in the dname cell, the code want to move focus into dnumber cell. How can I avoid this console error?
    How can I set cell value without this focus error?

    Please advice,
    Lajos

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