Hi,
I have a Grid with Customer - Order datas. In my datasource model there are customer name and customer id. In the grid there is only the customer name visible.
When I'm editing the row, the Customer name is a DropDownList, with custom Customer datasource (name, id).
So how can I make that, when I change the Customer name in the grid, it sholud change the customer id too in the customerorder datasource? Now my program is working, but when I change Customer with dropdown, in the model its change only the customer name.
I hope I was clear?
I think I should use the DropDownList's change event. How can I get the current datasource item's id field, and update this id to the parent datasource customer id?
Please advice,
Lajos
I have a Grid with Customer - Order datas. In my datasource model there are customer name and customer id. In the grid there is only the customer name visible.
When I'm editing the row, the Customer name is a DropDownList, with custom Customer datasource (name, id).
So how can I make that, when I change the Customer name in the grid, it sholud change the customer id too in the customerorder datasource? Now my program is working, but when I change Customer with dropdown, in the model its change only the customer name.
I hope I was clear?
I think I should use the DropDownList's change event. How can I get the current datasource item's id field, and update this id to the parent datasource customer id?
function
dolgozoDropDownEditor(container, options) {
$(
'<input data-text-field="nev" data-value-field="nev" data-bind="value:'
+ options.field +
'"/>'
)
.appendTo(container)
.kendoDropDownList({
autoBind:
false
,
dataSource: dolgozodata,
change:
function
() {
options.model.dszam = 100;
// Here I need this.dataitem.id or something like this
}
});
}
Please advice,
Lajos