ASP.NET MVC Kendo UI grid in partial view

4 posts, 0 answers
  1. Annie
    Annie avatar
    10 posts
    Member since:
    Oct 2014

    Posted 06 Oct 2014 Link to this post

    Hi,

    Is there a sample code for adding a MVC kendo UI grid in a partial view, and setting its datasource and columns in a view

    Thanks,
    Annie
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2310 posts

    Posted 08 Oct 2014 Link to this post

    Hi Annie,


    Generally the Grid columns should be specified in it's initialization code. Could you please elaborate what are you trying to achieve so I could assist further?

    I am looking forward to hearing from you.

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Annie
    Annie avatar
    10 posts
    Member since:
    Oct 2014

    Posted 08 Oct 2014 in reply to Dimiter Madjarov Link to this post

    Hi Dimiter,

    I would like to initialize the grid in a partial view, just setting sorting, reordering, paging, then in the view
    that calls the partial view set the datasource of the grid and also set the columns. This is so that we can re-use the same grid in multiple views

    Thanks,
    Annie
  4. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2310 posts

    Posted 09 Oct 2014 Link to this post

    Hi Annie,


    The current scenario is not directly supported in the MVC Grid. A similar alternatives that I could suggest, although they do no match the current requirements directly are:

    Binding to a collection of dynamic objects
    Binding to a DataTable

    Regards,
    Dimiter Madjarov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top