ASP.NET MVC Compatibility with ASP.NET Core MVC

5 posts, 0 answers
  1. Chris
    Chris avatar
    121 posts
    Member since:
    Oct 2015

    Posted 24 Sep 2019 Link to this post

    HI

    I have a ASP.NET MVC/ASP.NET Core MVC compatibility question 
    about ASP.NET Core MVC Grid.

    Why the following code not available in .NET Core 2.2 ?

    .cshtml

      columns.Template(template => { }).ClientTemplate(" ");

      More detail :

            .Columns(columns =>
            {
              ...
              columns.Template(template => { }).ClientTemplate(" ");
            })

    I think Telerik have the responsibility keep the code of recent version
    (R2 2017, R2 2019...) to compatible with ASP.NET Core MVC.

    Private implementation changed but should try to keep the public property/method the same.

    It is the Value/Reason Why We choose Telerik.

    Best regards

    Chris

     

     

  2. Chris
    Chris avatar
    121 posts
    Member since:
    Oct 2015

    Posted 24 Sep 2019 Link to this post

    Overload method GONE : 

        public GridTemplateColumn(Grid<T> grid, Action<T> template);
        public GridTemplateColumn(Grid<T> grid, Func<T, object> template);



    #region Assembly Kendo.Mvc, Version=2017.2.621.545, Culture=neutral, PublicKeyToken=121fae78165ba3d4
    // C:\Program Files (x86)\Telerik\UI for ASP.NET MVC R2 2017\wrappers\aspnetmvc\Examples\VS2015\Kendo.Mvc.Examples\bin\Kendo.Mvc.dll
    #endregion

    using System;
    using Kendo.Mvc.UI.Html;

    namespace Kendo.Mvc.UI
    {
      public class GridTemplateColumn<T> : GridColumnBase<T>, IGridTemplateColumn<T>, IGridColumn where T : class
      {
        public GridTemplateColumn(Grid<T> grid, Action<T> template);
        public GridTemplateColumn(Grid<T> grid, Func<T, object> template);

        protected override IGridDataCellBuilder CreateEditBuilderCore(IGridHtmlHelper htmlHelper);
        protected override IGridDataCellBuilder CreateInsertBuilderCore(IGridHtmlHelper htmlHelper);
      }
    }


    --


    #region Assembly Kendo.Mvc, Version=2019.2.619.0, Culture=neutral, PublicKeyToken=121fae78165ba3d4
    // C:\Users\Administrator\.nuget\packages\telerik.ui.for.aspnet.core\2019.2.619\lib\netstandard2.0\Kendo.Mvc.dll
    #endregion

    namespace Kendo.Mvc.UI
    {
      public class GridTemplateColumn<T> : GridColumnBase<T> where T : class
      {
        public GridTemplateColumn(Grid<T> grid);
      }
    }

  3. Chris
    Chris avatar
    121 posts
    Member since:
    Oct 2015

    Posted 24 Sep 2019 Link to this post


    Method GONE : 

      public virtual GridTemplateColumnBuilder<T> ClientTemplate(string value);


    #region Assembly Kendo.Mvc, Version=2017.2.621.545, Culture=neutral, PublicKeyToken=121fae78165ba3d4
    // C:\Program Files (x86)\Telerik\UI for ASP.NET MVC R2 2017\wrappers\aspnetmvc\Examples\VS2015\Kendo.Mvc.Examples\bin\Kendo.Mvc.dll
    #endregion

    namespace Kendo.Mvc.UI.Fluent
    {
      public class GridTemplateColumnBuilder<T> : GridColumnBuilderBase<IGridTemplateColumn<T>, GridTemplateColumnBuilder<T>> where T : class
      {
        public GridTemplateColumnBuilder(IGridTemplateColumn<T> column);

        public virtual GridTemplateColumnBuilder<T> ClientTemplate(string value);
      }
    }



    #region Assembly Kendo.Mvc, Version=2019.2.619.0, Culture=neutral, PublicKeyToken=121fae78165ba3d4
    // C:\Users\Administrator\.nuget\packages\telerik.ui.for.aspnet.core\2019.2.619\lib\netstandard2.0\Kendo.Mvc.dll
    #endregion
     
    namespace Kendo.Mvc.UI.Fluent
    {
      public class GridTemplateColumnBuilder<T> : GridColumnBuilder<GridTemplateColumn<T>, GridTemplateColumnBuilder<T>> where T : class
      {
        public GridTemplateColumnBuilder(GridTemplateColumn<T> column);
      }
    }

  4. Chris
    Chris avatar
    121 posts
    Member since:
    Oct 2015

    Posted 24 Sep 2019 Link to this post



    Overload method NoRecords(string) GONE : 

        public GridBuilder<T> NoRecords(string text);

    #region Assembly Kendo.Mvc, Version=2017.2.621.545, Culture=neutral, PublicKeyToken=121fae78165ba3d4
    // C:\Program Files (x86)\Telerik\UI for ASP.NET MVC R2 2017\wrappers\aspnetmvc\Examples\VS2015\Kendo.Mvc.Examples\bin\Kendo.Mvc.dll
    #endregion

    using System;
    using System.Collections;
    using System.Collections.Generic;

    namespace Kendo.Mvc.UI.Fluent
    {
      public class GridBuilder<T> : WidgetBuilderBase<Grid<T>, GridBuilder<T>> where T : class
      {
        public GridBuilder(Grid<T> component);

        public GridBuilder<T> NoRecords();
        public GridBuilder<T> NoRecords(Action<GridNoRecordsSettingsBuilder> configurator);
        public GridBuilder<T> NoRecords(string text);


    #region Assembly Kendo.Mvc, Version=2019.2.619.0, Culture=neutral, PublicKeyToken=121fae78165ba3d4
    // T:\HIS\VGHTC\SourceCode\packages\telerik.ui.for.aspnet.core\2019.2.619\lib\netstandard2.0\Kendo.Mvc.dll
    #endregion

    using System;
    using System.Collections;
    using System.Collections.Generic;

    namespace Kendo.Mvc.UI.Fluent
    {
      public class GridBuilder<T> : WidgetBuilderBase<Grid<T>, GridBuilder<T>> where T : class
      {
        public GridBuilder(Grid<T> component);

        public GridBuilder<T> NoRecords();
        public GridBuilder<T> NoRecords(Action<GridNoRecordsSettingsBuilder<T>> configurator);








  5. Georgi
    Admin
    Georgi avatar
    703 posts

    Posted 27 Sep 2019 Link to this post

    Hello Chris,

    Let me start by saying that I totally understand your frustration and thank you for the detailed explanation. Generally speaking the .Net Core and the .Net MVC Telerik UI libraries are two separate products. Thus, although they have some similarities, they are completely different. For example, in .Net Core everything is rendered on the client and you could replace the Template.ClientTemplate with a simple Template configuration.

    e.g.

            .Columns(columns =>
            {
              ...
              columns.Template("Template comes here");
            })

    In other words, we do our best to make all of our products consistent but we also follow the best practices for the underlying framework which sometimes requires to slightly change the configuration shape.

    Furthermore, the NoRecords method has an overload with a configurator where you can pass the message as follows:

    .NoRecords(x=> x.Template("Message goes here"))

    You can find the full list of grid settings in the following article:

    Please let me know if I can further assist you on this case.

    I look forward to your reply.

    Regards,
    Georgi
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top