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

ASP.NET MVC Compatibility with ASP.NET Core MVC

4 Answers 253 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Chris asked on 24 Sep 2019, 08:28 AM

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

 

 

4 Answers, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 24 Sep 2019, 09:02 AM
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);
  }
}

0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 25 Sep 2019, 01:54 AM

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);
  }
}

0
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
answered on 25 Sep 2019, 02:21 AM


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);








0
Georgi
Telerik team
answered on 27 Sep 2019, 08:41 AM

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.
Tags
General Discussions
Asked by
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Answers by
Chris
Top achievements
Rank 1
Veteran
Iron
Iron
Georgi
Telerik team
Share this question
or