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

Event trigger on Grid Editor Pop-up Load

1 Answer 531 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 04 Nov 2013, 07:25 PM
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!

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 06 Nov 2013, 11:52 AM
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!
Tags
Grid
Asked by
Richard
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or