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

MVC 4 telerikGrid Grouping error.

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alvin
Top achievements
Rank 1
Alvin asked on 25 Mar 2013, 10:19 AM
Hi Guys,

I'm using VS2010 with MVC 3 before. The grouping of the grid before is working as expected using this codes.

@(Html.Telerik().Grid<MyModelHere>()
        .Name("MyGridNameHere")
        .Columns(columns =>
                 {
                     columns.Bound(o => o.DueDateShortString).Width(75).Title(Html.Talent().GlobalTextResource("DueDate").ToString());               
                     columns.Bound(o => o.LearningCurriculumLabel).Hidden().ClientGroupHeaderTemplate("<div class='gridHeaderLabelGroup headerStandardGroup'><#= Key #></div>");
                 })
    .EnableCustomBinding(true)
    .DataBinding(dataBinding => dataBinding.Ajax().Select("RequiredTrainingGrid", "LearningManagement", new {id = Model.PersonID}).Enabled(true))
    .Sortable(sorting => sorting.SortMode(GridSortMode.SingleColumn).OrderBy(x => x.Add("DueDateShortString")))
    .Groupable(grouping => grouping.Groups(groups =>
           {
                groups.Add(o => o.LearningCurriculumLabel);
            }).Visible(false))
    .Pageable(paging => paging.Enabled(true).PageSize(5))
     )



But after migrating to VS2012 MVC 2012. This code is not working anymore.

Need your help on this guys.



Alvin

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 27 Mar 2013, 09:09 AM
Hello Alvin,

Could you provide a little more information about the problem you are experiencing? Is there an exception thrown when using the specified configuration? Is the grouping not working correctly? If the grouping is not working as expected, could you provide your custom binding implementation?
Also, please verify that you have included the binding configuration for old assemblies in your Web.config file:

<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Kind regards,
Daniel
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Alvin
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or