mcass20
mcass20

Reputation: 1688

Kendo MVC Ajax Grid PopUp editor: How to show/hide fields dynamically

I have a custom editor template with all the fields on it. When a user adds a new record using the popup editor, I use jquery to show/hide some fields depending on what options are chosen in some dropdowns. This part works fine.

The problem I am running into is when a user tries to edit an existing record. All of the fields are displaying when I would want to evaluate what some of the dropdowns choices were and show/hide fields based on those dropdown selections.

I tried using the $(document).ready jquery function to evaluate certain controls but they always come back null.

How do I reference the selected option for a dropdown control in a popup editor for an existing record in a kendo mvc grid?

Upvotes: 2

Views: 1185

Answers (1)

Atanas Korchev
Atanas Korchev

Reputation: 30671

You can use the edit event of the grid. The container field of the event arguments contains all editing UI elements.

Upvotes: 1

Related Questions