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

ASP.NET MVC Kendo UI grid in partial view

3 Answers 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Annie
Top achievements
Rank 1
Annie asked on 06 Oct 2014, 09:42 PM
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

3 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 08 Oct 2014, 08:12 AM
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.

 
0
Annie
Top achievements
Rank 1
answered on 08 Oct 2014, 03:30 PM
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
0
Dimiter Madjarov
Telerik team
answered on 09 Oct 2014, 08:29 AM
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.

 
Tags
Grid
Asked by
Annie
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Annie
Top achievements
Rank 1
Share this question
or