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

Set Grid Column Editor function with wrappers

1 Answer 254 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 01 Apr 2016, 06:01 PM

Is it possible to set the grid column editor function using the MVC wrappers?

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.editor

I only see see EditorTemplateName(string) to specify an MVC editor template. I need to do the editor on client side because I need access to the whole model to dynamically create a control based on model value.

 

Or is it possible to set this function after initialization?

I tried $("#grid").data("kendoGrid").columns[1].editor = function(container, options) {...}

This did not work.

1 Answer, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 05 Apr 2016, 11:00 AM

Hello Adam,

I'm afraid but the UI for ASP.NET MVC wrapper is designed to work with the ASP.NET MVC framework's built-in EditorTemplate infrastructure. If you need to use the column.editor as a function you will need to consider using the plain JavaScript configuration instead of the wrapper.

Another approach you may consider will be to build the editor template via the EditorTemplate infrastructure and use Grid's edit event to hide/show the appropriate elements.

Regards,
Rosen
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Adam
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Share this question
or