Hi
I'm trying to create a grid with a variable number of columns using the MVC Grid component referencing the following (simplified) model:-
public class GridModel
{
     public int Id { get; set; }
     public string Name { get; set; }
     public List<int> Values { get; set; }
}
Using the AutoGenerate option of the column configuration only seems to create columns for the Id & Name model properties, but not the Values enumerable.
I can't find an obvious way to achieve this; could you provide some help please?
Thanks in Advance

Hello, I want to paste data into grid, please revise my code. Thanks.
@(Html.Kendo().Grid<ConfigurationModel>()
        .Name("grid")
        .Events(e => e.Edit("onGridEdit"))
        .AutoBind(false)
        .Columns(columns =>
        {
            columns.Bound(c => c.A);
            columns.Bound(c => c.B);
            columns.Bound(c => c.C);
            columns.Command(command => { command.Edit(); command.Destroy(); }).Width(250);
        })
        .ToolBar(toolbar => { toolbar.Create();  toolbar.Excel(); })
        .Editable(editable => editable.Mode(GridEditMode.InLine))
        .HtmlAttributes(new { style = "height: 550px;" })
        .Sortable()
        .Pageable(pageable => pageable
             .Refresh(true)
             .PageSizes(true)
             .ButtonCount(15))
        .Excel(excel => excel
            .FileName("Export.xlsx")
            .Filterable(true)
            .ProxyURL(Url.Action("Excel_Export_Save", "Grid"))
        )
        .DataSource(dataSource => dataSource
            .Ajax()
            .Events(events => events.Error("grid_error"))
            .Model(model =>
            {
                model.Id(p => p.A);
               
            })
            .Create(create => create
                .Action("Create", "Configuration"))
            .Read(read => read
                .Action("Read", "Configuration")
             )
            .Update(update => update
                .Action("Update", "Configuration")
            )
            .Destroy(destroy => destroy
                .Action("Destroy", "Configuration"))
            .PageSize(10)
        )

I am fairly new to kendo UI and very new to MVC. We have an application written in kendo UI. I am concerned about the potential volume of data being transferred to the client side as datasets grow. I am thinking of making some of our current application MVC based if we can gain greater control over paging through grids.
1) With kendo UI is it the case that the page brings back the whole result set, and then paging through is managed locally client side within the page?
2) With MVC version of the grid is the data bound server side or is the whole dataset delivered to the browser and paging managed as per (1). Does this limit the amount the data transferred from server to client?
3) With MVC version is there any mechanism that allows the paging to occur within the SQL statement to restrict the size of the result turned from the database server?
Any pointers with this would be appreciated.
@{    ViewBag.Title = "Index";    Layout = "~/Views/Shared/_Layout.cshtml";}<h2>Index</h2>@using (Html.BeginForm()){    @Html.AntiForgeryToken()    @(Html.Kendo().Grid<InclusionManagerMVC.Models.HouseModels.HouseModel>().Name("HouseGrid")    .HtmlAttributes(new { style = "height:600px;" }).ToolBar(toolbar =>{    toolbar.Create();}).Columns(columns =>{    columns.Bound(c => c.ID).Visible(false);    columns.Bound(c => c.Name).Title("House Name");    columns.Bound(c => c.TooltipText).Title("Description");    columns.Bound(c => c.Active).Title("Enabled");    columns.Command(c => c.Edit());}).Editable(edit =>{    edit.TemplateName("HouseModel").Mode(GridEditMode.PopUp);}).DataSource(datasource =>{    datasource.Ajax()        .Create(create => create.Action("Create_House", "Houses", new { area = "Administration" }).Data("sendAntiForgery"))        .Read(read => read.Action("Read_House", "Houses", new { area = "Administration" }))        .Update(update => update.Action("Update_House", "Houses", new { area = "Administration" }).Data("sendAntiForgery"))        .Model(model =>        {            model.Id(field => field.ID);            model.Field(field => field.ID).DefaultValue(Guid.NewGuid());            model.Field(field => field.Name);            model.Field(field => field.Active).DefaultValue(true);            model.Field(field => field.TooltipText).DefaultValue(string.Empty);            model.Field(field => field.SchoolsIdList).DefaultValue(new List<InclusionManagerMVC.Models.SchoolModels.SchoolsModel>());            model.Field(field => field.TenantIdList).DefaultValue(new List<InclusionManagerMVC.Models.TenantModels.TenantsModel>());        })        .Events(events => events.Error("error_handler"));}).Pageable(page => page.PageSizes(new int[] { 10, 20, 50, 100, 250, 1000 }).Refresh(true)).Sortable().Groupable().Filterable().Scrollable().ColumnMenu()    )}<script type="text/javascript">    function tenantsfilter()    {        var multiSelect = $("#TenantIdList").data("kendoMultiSelect");        var values = multiSelect.value($("#value").val());        console.log(values.length);                 return { tenants: values.toString() };    }    function refresh_multiSelect(e)    {        console.log(e);        $("#SchoolsIdList").data("kendoMultiSelect").dataSource.read();            }</script>@model InclusionManagerMVC.Models.HouseModels.HouseModel@Html.HiddenFor(m => m.ID)<div class="form-horizontal" role="form" style="padding:10px;">    <div class="form-group">        @Html.LabelFor(m => m.Name, new { @class = "form-label col-lg-2" })        <div class="col-lg-6">            @Html.TextBoxFor(m => m.Name, new { @class = "form-control", placeholder = "Enter name of the house" })        </div>    </div>    <div class="form-group">        @Html.LabelFor(m => m.TooltipText, new { @class = "form-label col-lg-2" })        <div class="col-lg-6">            @Html.TextAreaFor(m => m.TooltipText, new { @class = "form-control", placeholder = "Enter a description about this house" })        </div>    </div>    <div class="form-group">        @Html.LabelFor(m => m.Active, new { @class = "form-label col-lg-2" })        <div class="col-lg-6">            @Html.CheckBoxFor(m => m.Active)        </div>    </div>    <div class="form-group">         @Html.LabelFor(m => m.TenantIdList, new { @class = "form-label col-lg-2" })        <div class="col-lg-6">            @(                Html.Kendo().MultiSelectFor(m => m.TenantIdList)                .DataTextField("Name")                .DataValueField("ID")                .DataSource(datasource =>                 {                    datasource.Read(read => read.Action("GetTenants", "Houses", new { area = "Administration" }));                })                .Placeholder("Select School Groups")                .IgnoreCase(true)                .HighlightFirst(true)             )        </div>    </div>    <div class="form-group">        @Html.LabelFor(m => m.SchoolsIdList, new { @class = "form-label col-lg-2" })        <div class="col-lg-8">            @( Html.Kendo().MultiSelectFor(m => m.SchoolsIdList)                .DataTextField("Name")                .DataValueField("ID")                .AutoBind(false)                                 .DataSource(datasource =>                {                    datasource.Read(read => read.Action("GetSchools", "Houses", new { area = "Administration" })                        .Data("tenantsfilter"))                        .ServerFiltering(true)                        .Events(events => events.Error("error_handler").Change("refresh_multiSelect"));                })                .Placeholder("Select Schools")                .IgnoreCase(true)                .HighlightFirst(true)                .ItemTemplate("<span class=\"label label-info\">#: data.Name#</span><span class=\"label label-default\">(#:data.TenantName#)</span> ")            )        </div>    </div>    @Html.Partial("_ErrorPanel")</div>public JsonResult Read_House([DataSourceRequest] DataSourceRequest request)       {           this.Response.Cache.SetCacheability(HttpCacheability.NoCache);           List<HouseModel> model = new List<HouseModel>();           try           {               model = houseSvc.GetHousesList();           }           catch (Exception error)           {               throw error;           }           return Json(model.ToDataSourceResult(request), JsonRequestBehavior.AllowGet);       }       public JsonResult GetTenants()       {           this.Response.Cache.SetCacheability(HttpCacheability.NoCache);           List<TenantsModel> model = tenantSvc.GetTenantsList(true);                        return Json(model, JsonRequestBehavior.AllowGet);       }       public JsonResult GetSchools(string tenants)       {           this.Response.Cache.SetCacheability(HttpCacheability.NoCache);           List<string> tenantStringList = tenants.Split(',').ToList();           List<TenantsModel> tenants2 = tenantSvc.GetTenantsList(true, tenantStringList);                                    List<SchoolsModel> model = schoolSvc.GetSchoolsList(true, tenants2);           return Json(model, JsonRequestBehavior.AllowGet);       }Hi,
Just a generic question: how to pass grid data back to controller. I tried to search a bit. Look like it needs to use ajax but I am not sure how it works exactly. Do you have a simple sample code? The link to some old sample code is not valid anymore.
Thanks
Tong

I need to make a custom week layout for a Scheduler
see image

Is there a way to build a GridState from server-side code?
We want to be able to set up the grid in a specific based on certain filters that are in a database. As far as I can tell the only way I could do that now is to look at how the structure of the JSON object is formed and create my own JSON object Grid State constructor based on that. But I don't like that idea because the structure could change with time, or there might be small things that I miss.
I'm looking for something along the lines of this:
GridState gs = new GridState();
gs.addFilter("columnName","filterText", columnWidth, showColumn, ..., .., )
Does anything like this exist?
Hello,
We need to install version 2011.3.1305.40 What is the download link?
Thank you