Telerik Forums
UI for ASP.NET Core Forum
1 answer
117 views

Hi, I have this Grid which uses Custom Binding for manual skip and take on the server.

After successful Read of data, my problem now is the Search and Filtering feature is now working.

 

 

@(Html.Kendo().Grid<MyWebApp.Web.Models.ViewModel>()
        .Name("grid")
        .EnableCustomBinding(true)
        .Columns(columns =>
        {
            columns.Bound(p => p.Sorting).Width(100).Filterable(false);
            columns.Bound(p => p.Code).Width(200).Filterable(true);
            columns.Bound(p => p.Description).Filterable(true);
        })
        .ToolBar(toolbar =>
        {
            toolbar.Search();
        })
        .Filterable()
        .Pageable()
        .Sortable()
        .Scrollable(scr => scr.Height(550))
        .DataSource(dataSource => dataSource
            .Ajax()
            .Events(events => events.Error("error_handler"))
            .Model(model => model.Id(p => p.Id))
            .Read("gridDataSource", "Home")
        )
)
Alexander
Telerik team
 answered on 26 Dec 2023
1 answer
761 views
Good day Telerik Community.

Just recently our team started migrating most of our products to .NET 8 to align ourselves with the new release. However, when installing the updated Microsoft packages (or when trying to update ourselves to the new releases of Telerik), there seems to be a package conflict between Microsoft.EntityFrameworkCore.Tools and Telerik's UI For Asp.Net Core. Both packages use Microsoft.CodeAnalysis (the latter internally) but with different versions (4.5.0 or higher and 4.4.0 respectively).

Here's the error:
NU1107: Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces. Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 4.5.0 directly to project projectname to resolve this issue. 

Microsoft.EntityFrameworkCore.Tools 8.0.0 -> Microsoft.EntityFrameworkCore.Design 8.0.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.5.0) 

Telerik.UI.for.AspNet.Core 2023.3.1129-Internal -> Microsoft.CodeAnalysis 4.4.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces (= 4.4.0).


Both Telerik's latest releases (2023.3.1010 and
2023.3.1114) do not address or resolve this issue, and i didn't see a lot of post regarding it either (I've only found one single post. I'm linking it below for those interested)
Since that post's last message is dated more than a month ago, i'm asking if a solution was actually found or we just have to wait for the next stable release from Telerik (we've also tried using even the pre-release version, but nothing changed)
 
.Net 8 compatibility in UI for ASP.NET Core | Telerik Forums
Alexander
Telerik team
 answered on 25 Dec 2023
1 answer
71 views

Hi!

I've stumbled upon an issue with positioning of resize handlers for an image placed inside a table.
The resize handlers appears above the table altogether.

Steps to replicate:

Expected behaviour:

  • Select image
  • Resize handlers appear along the edge of the image

I have replicated the same problem in Chrome, Edge, Opera and Firefox.

See attached image for more details.

 

Is this something you are looking into, or should i try to make my own fix?
If you are looking into this, when could I expect a possible fix?

Kindest regards,
Tobias Nordby

Mihaela
Telerik team
 answered on 20 Dec 2023
1 answer
134 views

I am trying to get the export PDF of my grids to have the heads repeated on each page. Following the awful documentation I have been unable to get it to work. Some of the other functions work and others are ignored, however I'm only concerned about the headers. 

Here is my grid code:

		@(Html.Kendo().Grid<TheGridName>()
				.Name("mainGrid")
				.HtmlAttributes(new { @class = "gridHeight"})
				.Columns(col =>
				{
					col.Bound(c => c.col1).Title("Test 1");
					col.Bound(c => c.col2).Title("Test 2");
					col.Bound(c => c.col3).Title("Test 3");
					col.Bound(c => c.col4).Title("Test 4");
					col.Bound(c => c.col5).Title("Test 5");
					col.Bound(c => c.col6).Title("Test 6").;
				})
				.ToolBar(toolbar =>
				{
					toolbar.Excel();
					toolbar.Pdf();
				})
				.Pdf(pdf => pdf
					.AllPages(true)
					.AvoidLinks(false)
					.PaperSize("8in" , "11.5in")
					.Margin("2cm", "1cm", "1cm", "1cm")
					.Landscape(true)
					.Scale(0.8)
					.RepeatHeaders(true)
					.FileName("Kendo UI Grid Export.pdf")
					.ProxyURL(Url.Action("Pdf_Export_Save", "Grid"))
				)
				.Sortable()
				.Scrollable()
				.Filterable()
				.Resizable(r => r.Columns(true))
				.Reorderable(r => r.Columns(true))
				.Excel(excel => excel
				.FileName("test.xlsx"))
				.Events(x =>
				{
					x.ExcelExport("excelExport");
				})
				.ColumnMenu()
				.DataSource(ds => ds.Ajax()
				.Read(r => r.Url($"?handler=Read").Data("dataFunction"))
				.ServerOperation(false)
				))
Nothing fancy, just basic out of the box stuff. 

My Kendo and other important includes:
<script src="https://kendo.cdn.telerik.com/2023.1.314/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.1.314/js/kendo.aspnetmvc.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/2.1.0/pako.min.js"></script>

I'm guessing, like a lot of other features, this doesn't work in ASP.NET Core and this is some kind of copy paste error on Telerik's part and this only works in the jQuery version or something. 
Stoyan
Telerik team
 answered on 19 Dec 2023
1 answer
324 views

I have a breadcrumb control with 4 items, but the 2nd item is not shown (set to display: none). I saw in another forum post that some items will not be displayed if there is not enough room but that's not the case here. It's inside <ul class="navbar-nav flex-grow-1">

Also, I noticed that press F12 to open developer tools causes one of the items to disappear. Closing developer tools does not bring it back.

How can I ensure that all breadcrumb items are displayed?

Thanks

Mihaela
Telerik team
 answered on 18 Dec 2023
1 answer
83 views

Here is my grid:

@(Html.Kendo().Grid<AssetViewModel>()
      .Name("grid")
      .Columns(columns =>
       {
           columns.Bound(e => e.AssetId).Title("Asset").ClientTemplate(Html.Kendo().Template().AddComponent(avatar => avatar
                                                                                                                     .Avatar()
                                                                                                                     .Name("avatar_${data.AssetId}")
                                                                                                                     .Type(AvatarType.Image)
                                                                                                                     .Size(ComponentSize.Large)
                                                                                                                     .Rounded(Rounded.Full)
                                                                                                                     .Image(@Url.Action("GetFile", "MediaStore", new { fileId = "${data.LogoId}" }))
                                                                                                           )).Width(110);
           columns.Bound(e => e.AssetName).Title("Full Name").Width(200);
       })
      .Sortable()
      .Pageable()
      .Scrollable()
      .HtmlAttributes(new { style = "height:430px;" })
      .DataSource(dataSource => dataSource
                               .Ajax()
                               .PageSize(5)
                               .Read(read => read.Action("AssetListData", "Revenue"))
                 )

)

I have tried specifying as "#:AssetId#", "#=AssetId#" , and ${data.LogoId} but the parsing is not correct at runtime:

<span class="k-avatar-image"><img src="/MediaStore/GetFile?fileId=$%7Bdata.AssetId%7D"></span>

Ho do I get the LogoId properly?

Alexander
Telerik team
 answered on 14 Dec 2023
1 answer
386 views

Hi Telerik Team

I’m using ASP.NET CORE (.NET8) with
Telerik.UI.for.AspNet.Core Version="2023.3.1114"

Is this package ready for EF Core 8 ?

When I updated package Microsoft.VisualStudio.Web.CodeGeneration.Design
from version 7.x.x to version 8.0.0
I had to additionally install packages
Microsoft.CodeAnalytics.CSharp.Workspaces
Microsoft.CodeAnalytics.Workspaces.Common
Microsoft.CodeAnalytics.CSharp
Microsoft.CodeAnalytics.Common 4.8.0
because of Telerik.

I didn't need these packages before

Mihaela
Telerik team
 answered on 13 Dec 2023
1 answer
132 views

Hi,

Is there an easy way to disable the spinner when loading more content in the list view on endless scroll mode? I can set the following CSS to hide it altogether but this would affect the initial load and load after filter etc

    .k-loading-mask {
        display: none !important;
    }

Many thanks,

Dale

Stoyan
Telerik team
 answered on 12 Dec 2023
1 answer
124 views

Here is my grid setup:


@(Html.Kendo().Grid<AssetViewModel>()
      .Name("assetGrid")
      .Columns(columns =>
      {
	      columns.Bound(p => p.AssetId).Visible(false);
	      columns.Bound(p => p.AssetName).Title("Name").Filterable(false).Sortable(false)
	             .HtmlAttributes(new { style = "k-text-center !k-justify-content-center" }).HeaderHtmlAttributes(new { style = "k-text-center !k-justify-content-center" })
	             .ClientTemplate("<div class='identifier-container'><a href='" + Url.Action("ViewAsset", "Revenue", new { assetId = "#=AssetId#" }) + "'>#=AssetName#</a></div>");
		  columns.Bound(p => p.CategoryName).Title("Category").Width(130)
	             .HtmlAttributes(new { style = "text-align:center" }).HeaderHtmlAttributes(new { style = "text-align: center; justify-content: center" })
	             .ClientTemplate("<span class='#=CategoryCss#' title='#=CategoryName#'>#=CategoryName#</span>");
	      columns.Bound(p => p.ContactName)
	             .ClientTemplate("<span title='#+ContactName#'>#=ContactName#</span>");
	      columns.Bound(p => p.Age).Title("Age").Width(70)
	             .HtmlAttributes(new { style = "text-align:center" }).HeaderHtmlAttributes(new { style = "text-align: center; justify-content: center" });
	      columns.Bound(p => p.Cost).Title("Cost").Width(100)
	             .HtmlAttributes(new { style = "text-align:center" }).HeaderHtmlAttributes(new { style = "text-align: center; justify-content: center" });
	      columns.Bound(p => p.Investors).Title("Shares").Width(75)
	             .HtmlAttributes(new { style = "text-align:center" }).HeaderHtmlAttributes(new { style = "text-align: center; justify-content: center" });
	      columns.Bound(p => p.AssetId).Title("Act").Width(50).Filterable(false)
	             .HtmlAttributes(new { style = "text-align:center" }).HeaderHtmlAttributes(new { style = "text-align: center; justify-content: center" })
	             .ClientTemplate("<a href='" + Url.Action("EditAsset", "Revenue", new { assetId = "#=AssetId#" }) + " ' title='Edit the Asset'><i class='fa-duotone fa-pen-to-square fa-fw fa-lg theme-elevate-fa'></i></a>");
      })
      .ClientDetailTemplate(Html.Kendo().Template()
            .AddComponent(detailStrip => detailStrip
                  TabStrip().Name("tabStrip_${data.AssetId}")
                        .SelectedIndex(0)
                        .Animation(animation => animation.Open(open => open.Fade(FadeDirection.In)))
                        .Items(tabs =>
                        {
                              tabs.Add().SpriteCssClasses("fa-duotone theme-elevate-fa fa-magnifying-glass ").Text("Details").LoadContentFrom("GetAssetDetails", "Revenue", new { masterGridId = "${data.AssetId}" });
                              tabs.Add().SpriteCssClasses("fa-duotone theme-elevate-fa fa-chart-mixed      ").Text("Charts ").LoadContentFrom("GetLetterApprovers", "Revenue", new { masterGridId = "${data.AssetId}" });
                              tabs.Add().SpriteCssClasses("fa-duotone theme-elevate-fa fa-clock-rotate-left").Text("History").LoadContentFrom("GetLetterDetails", "Revenue", new { masterGridId = "${data.AssetId}" });
                        })
            )
      )
      .Size(ComponentSize.Small)
      .ToolBar(toolbar => { toolbar.Search(); })
      .Search(s =>
      {
	      s.Field(o => o.AssetName,    "contains");
	      s.Field(o => o.CategoryName, "contains");
	      s.Field(o => o.ContactName,  "contains");
      })
      .Scrollable(s => s.Height("auto"))
      .Reorderable(r => r.Columns(false))
      .Resizable(r => r.Columns(true))
      .Pageable(p =>
      {
	      p.Refresh(false);
	      p.PageSizes(new[] { 5, 10, 20, 25, 50, 75, 100, 125, 150, 175, 200 });
	      p.ButtonCount(10);
	      p.Info(true);
      })
      //.Filterable()
      .Sortable()
      //.ColumnMenu(col => col.Filterable(false).Enabled(false))
      .DataSource(dataSource => dataSource
                .Ajax()
                .Read(read => read.Action("AssetListData", "Revenue"))
                .Sort(sort => sort.Add(nameof(AssetViewModel.AssetName)).Ascending())
                .PageSize(20)
	  ))

I'm having a few issues:

  1. Tab FontAwesome icons are not showing*
  2. the `masterGridId = "${data.AssetId}"` is not translating properly, and the actual parameter value sent back to action is a string: "${data.AssetId}"*
  3. At a given time, only one row must be expanded as the application is going to be used on a mobile screen
  4. Lastly, is there any chance of converting this into TagHelper format?

The '*' questions are most important.

Alexander
Telerik team
 answered on 12 Dec 2023
2 answers
1.7K+ views

So we have this recurring issue every time:

Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces.
Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 4.8.0-3.final directly to project ProjectName to resolve this issue.

 ProjectName -> Microsoft.VisualStudio.Web.CodeGeneration.Design 8.0.0 -> Microsoft.VisualStudio.Web.CodeGenerators.Mvc 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Core 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Utils 8.0.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.8.0-3.final) 
 ProjectName -> Telerik.UI.for.AspNet.Core 2023.3.1114 -> Microsoft.CodeAnalysis 4.4.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces (= 4.4.0).

Now, Microsoft.CodeAnalysis and all DLLs are at v4.8. I have just installed Microsoft.CodeAnalysis v4.8 but I am getting the above error (it's not a warning, but an error). This has happened a few times before. I keep adding numerous DLLs until the error becomes a persistent warning. Is there a more professional solution to this?

Alexander
Telerik team
 answered on 11 Dec 2023
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?