MVC 4 telerikGrid Grouping error.

2 posts, 0 answers
  1. Alvin
    Alvin avatar
    1 posts
    Member since:
    Dec 2011

    Posted 25 Mar 2013 Link to this post

    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
  2. Daniel
    Admin
    Daniel avatar
    2219 posts

    Posted 27 Mar 2013 Link to this post

    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!
Back to Top