Update grid values in popup editor on change event

6 posts, 0 answers
  1. Igor
    Igor avatar
    21 posts
    Member since:
    Sep 2016

    Posted 15 Jun 2017 Link to this post

    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

     

  2. Georgi
    Admin
    Georgi avatar
    671 posts

    Posted 16 Jun 2017 Link to this post

    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.
  3. Igor
    Igor avatar
    21 posts
    Member since:
    Sep 2016

    Posted 23 Jun 2017 Link to this post

    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

  4. Christopher
    Christopher avatar
    16 posts
    Member since:
    Apr 2013

    Posted 23 Jun 2017 Link to this post

    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

  5. Igor
    Igor avatar
    21 posts
    Member since:
    Sep 2016

    Posted 24 Jun 2017 in reply to Georgi Link to this post

    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

     

  6. Georgi
    Admin
    Georgi avatar
    671 posts

    Posted 26 Jun 2017 Link to this post

    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.
Back to Top