Let say I have 3 columns in the grid:
- first name
We use popup editor to edit grid rows by Edit action click. User enters or picks last name and first name with kendo dropdown box. If the first name value or last name value changed with not empty value we need to update name value in popup editor as well: name = first name +" "+ last name. It is not clear how to get an access to the fields in popup editor. Please look at my example: http://dojo.telerik.com/@iakhmedov1/AhUpa. Please clarify how programatically update values in the popup editor.
5 Answers, 1 is accepted
The edit event is fired when user edits a data item. It is possible to attach an event handler to the edit event that applies the logic for setting name property dynamically.
I have modified the dojo sample you sent me and now the name property is set programmatically with the aforementioned approach:
Thank you very much for your explanation. I was not able load your example this morning: "Failed to load snippet.". Could you please check why it cannot be loaded?
Thank you very much for your great explanation and quick response.
Your example worked partially because did not copy built name value from editor pane to main grid by "Update" button click. My guess was that we should have notified Kendo about changed input text box value using trigger("change") to fire Change event. Doing this I was able to copy the value from editor to main grid: please look at this example http://dojo.telerik.com/@iakhmedov1/uDoDI
However, this approach did not work for kendoMaskedTextBox which I added to the grid to programmatically set the value when first name is changed by user. Phone value was set in the editor pane, but was not copied to the grid with Update button hit. You can see in my example that trigger("change") did not fire Change event for kendoMaskedTextBox. What could I miss and how it can be fixed?
Since the approach to trigger the change event of the Kendo MaskedTextBox is not applicable, I suggest you to manually set the phone of the model when the name is changed.
The dojo below illustrates the aforementioned approach: