Set Grid Column Editor function with wrappers

2 posts, 0 answers
  1. Adam
    Adam avatar
    1 posts
    Member since:
    Aug 2015

    Posted 01 Apr Link to this post

    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.

  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 05 Apr Link to this post

    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
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top