Ben Bloodworth
Ben Bloodworth

Reputation: 1041

Telerik UI for ASP.NET MVC - Dynamic Editor Type

Objective: I am using a Telerik ASP.NET MVC grid (Not the KendoUI grid) for a site's settings page. I would like to use inline editing and I'm looking for a way to use a different editor type based upon each setting's data type. The data type is stored in the table with each setting so I have easy access to that information. I want to be able to choose a textbox, drop-down, checkbox, or WYSIWYG editor for the value field based on the data type of each setting.

Question: My web searches have not turned up any evidence that this is even possible so I would like to know from others with Telerik experience if my objective is even attainable?

If this is possible, any tips or instructions you're willing to offer me would be greatly appreciated.

Upvotes: 0

Views: 157

Answers (1)

chambo
chambo

Reputation: 491

Question: My web searches have not turned up any evidence that this is even possible so I would like to know from others with Telerik experience if my objective is even attainable?

It's definitely possible (almost anything is), but not out of the box. You will have to write a bunch of custom code to handle switching the controls based on the data types or a lot of template code with every control you want to handle and switch based on the data type. We have done something similar using a switched template that tests the data type and shows/binds the control related to that data type.

Upvotes: 1

Related Questions