This is a migrated thread and some comments may be shown as answers.

Update grid values in popup editor on change event

5 Answers 2823 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Igor
Top achievements
Rank 1
Igor asked on 15 Jun 2017, 09:15 AM

Hello,

Let say I have 3 columns in the grid:

- first name

-last name

-full 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.

Thanks,

Igor

 

5 Answers, 1 is accepted

Sort by
0
Georgi
Telerik team
answered on 16 Jun 2017, 03:47 PM
Hello Igor,

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:


Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Igor
Top achievements
Rank 1
answered on 23 Jun 2017, 09:21 AM

Hi Georgi,

 

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?

 

Thanks,

Igor

0
Christopher
Top achievements
Rank 1
answered on 23 Jun 2017, 10:14 AM

Hi Igor,

they are experiencing temporary issues with theircode services. You could follow the status for the Telerik Backend Cloud Code Services here:
http://status.telerik.com/

Here you can find the original post.

 

Regards,

Chris

0
Igor
Top achievements
Rank 1
answered on 24 Jun 2017, 09:32 PM

Hello Georgi,

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?

Best regards,

Igor

 

0
Georgi
Telerik team
answered on 26 Jun 2017, 02:41 PM
Hi Igor,

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:



Regards,
Georgi
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Igor
Top achievements
Rank 1
Answers by
Georgi
Telerik team
Igor
Top achievements
Rank 1
Christopher
Top achievements
Rank 1
Share this question
or