jQWidgets Forums
Forum Replies Created
-
Author
-
May 13, 2013 at 10:21 am in reply to: Grid combobox editor change another property in the same row Grid combobox editor change another property in the same row #21030
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
May 13, 2013 at 8:13 am in reply to: Grid combobox editor change another property in the same row Grid combobox editor change another property in the same row #21014Hi 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 -
AuthorPosts