Event trigger on Grid Editor Pop-up Load

2 posts, 0 answers
  1. Richard
    Richard avatar
    10 posts
    Member since:
    Aug 2013

    Posted 04 Nov 2013 Link to this post

    I'm using the Grid Editor with a Partial View. One group of inputs in the editor should only be displayed if a boolean option is true (which has a corresponding checkbox on the form).

    How do I configure the Grid Editor to trigger a Javascript event so that the group can be hidden/displayed according to whether the field is set (i.e., the checkbox is set)?

    I've tried a couple things:
    • Calling the javascript method in the <script> block in the CSHTML template. This appears to be run before the values are filled in for the entry being edited, though.
    • Adding a window open event, but that event is not being triggered.
    Thanks!
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2272 posts

    Posted 06 Nov 2013 Link to this post

    Hi Richard,


    The correct event to use in the current scenario is the edit event of the Grid. In the event handler you could use the e.model parameter to access the current dataItem and the e.container parameter to access the window content and modify it.

    Regards,
    Dimiter Madjarov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top