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

I am porting a WebForms application to ASP.NET Core MVC, and I'm having trouble moving from the RadMenu (Telerik UI for .NET AJAX) to the menu component in Telerik UI for ASP.NET Core. After going down many blind alleys I'm stumped as to how to bind my data (an array of a custom type which includes menu text, target URLs, and more). My menu has a collection of top-level items and some of them have sub-menu items. It seems like this should be pretty straightforward but I can't find an example or documentation that explains how to bind my menu to an array.

I think I need to do something like this:

@(Html.Kendo().Menu()
           .Name("MyMenu")
           .DataTextField("Text")
           .Action(<action>)
           .DataSource(???)
           .Model(model => model.Children("MenuItems"))) <<<--- This came from an example, I don't know what it does)
   )

Can someone point me to a simple example?

 

Eyup
Telerik team
 answered on 17 Oct 2023
1 answer
786 views

I have a Html.Kendo().Grid  ASP.Net core 7.0 project. The grid displays several columns, some of them have big text. I want the text to not wrap. The text should show '...' in the end if the text is longer than the grid column. 

I have added 

 .k-grid td {       
     white-space: nowrap;        
 }

but still the text wraps as shown in the attached image.

Mihaela
Telerik team
 answered on 16 Oct 2023
1 answer
105 views
It appears that using the Razor syntax allows us to set:
new object[] { 5, 10, 20, 50, "All" }
However, the TagHelper does not. It only supports ints. Therefore, I do not have a way to use the special "all" keyword for the pager while using TagHelpers.
Alexander
Telerik team
 answered on 16 Oct 2023
0 answers
133 views

I have a similar issue to this question [https://www.telerik.com/forums/tooltip-position-incorrect-when-scrolled-down-page], however we are using jQuery 3.7.1.

What I found was that we were using the .Animation property to enhance the UI.  If I remove the .Animation property, it renders correctly when scrolling.

We are also using this with .ToClientTemplate() on the ToolTip as well.

Is this a known issue?


@(Html.Kendo().Tooltip()
    .For("#image-info")
    .Position(TooltipPosition.Left)
    .Content("Here is my tooltip text")
    .Width(250)
    //.Animation(a =>
    //{
    //    a.Open(o =>
    //    {
    //        o.Expand();
    //    });
    //})
    .ToClientTemplate())

Michael
Top achievements
Rank 1
 asked on 13 Oct 2023
1 answer
84 views

I have a set of custom filters(Country, state, county, Missing city) and if I select all three and click a <generate report> button ,
I want to see a custom grid (Custom Editing in ASP.NET Core Grid Component Demo | Telerik UI for ASP.NET Core) with columns 
Country; State; County; 
and Missing City ID as textbox with validate for each as shown in image attached. 
If I 
1. enter the missing city ID inside the cell and click validate, a confirmation dialog should open with city ID and name. 
2. confirmation dialog will have the city id with details as Name and Zipcode, as shown in image
3. Upon confirmation I want to save the city id to missing records and update the grid.

How do I achieve this using the demo from above?

Peter
Telerik team
 answered on 13 Oct 2023
1 answer
469 views

I want to use this demo:  https://demos.telerik.com/aspnet-core/multiselect and have a checkbox on left side of the list.
Upon selecting the tag I want to see the count of items selected instead of showing them as chips with names as selected.

I want to use this demo : https://demos.telerik.com/kendo-ui/dropdownlist/index and have a checkbox and show count for no of tags selected as in this demo: Kendo UI Snippet | Kendo UI Dojo (telerik.com).

I see a jquery approach but I want to implement a html tag helper approach in both cases for asp net core
I have attached a image that I have as UI

 
Peter
Telerik team
 answered on 13 Oct 2023
2 answers
103 views

Hi,

I am trying to submit multiple POMaterials through this form. But it doesn't work. I entered a breakpoint to check if data is being passed from the view, but I get null entry for all the Entries in the grid.

 

 

<form asp-action="CreatePO" id="PorequestForm" name="PorequestForm"><div asp-validation-summary="ModelOnly" class="text-danger"></div><fieldset><legend>Materials</legend> @*@Html.LabelFor(category => category.Justification) @Html.EditorFor(category => category.Justification)*@ @( Html.Kendo().Grid(Model.POMaterials) .Name("PoMaterial") .ToolBar(tools => tools.Create().Text("Add PO Materials")) .Editable(editable => editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Bottom)) .Columns(columns => { columns.Bound(p => p.ItemNumber).ClientTemplate("#= ItemNumber #" + "<input type='hidden' name='POMaterial[#= index(data)#].ItemNumber' value='#= ItemNumber #' />" ); columns.Bound(p => p.Description).ClientTemplate("#= Description #" + "<input type='hidden' name='POMaterial[#= index(data)#].Description' value='#= Description #' />" ); columns.Bound(p => p.Amount).ClientTemplate("#= Amount #" + "<input type='hidden' name='POMaterial[#= index(data)#].Amount' value='#= Amount #'/>" ); columns.Bound(p => p.UnitCost).ClientTemplate("#= UnitCost #" + "<input type='hidden' name='POMaterial[#= index(data)#].UnitCost' value='#= UnitCost #' />" ); columns.Bound(p => p.PomaterialId).Hidden().ClientTemplate("#= PomaterialId #" + "<input type='hidden' name='POMaterial[#= index(data)#].PomaterialId' value='#= PomaterialId #' />" ); columns.Command(command => command.Destroy()).Width(100); }) .DataSource(dataSource => dataSource.Ajax() .Model(model => { model.Id(p => p.PomaterialId); model.Field(p => p.PomaterialId).Editable(false); }) .Batch(true) //.Read(read => read.Action("ReadPoRequest", "Grid")) //.Create(create => create.Action("AddPORequest", "Grid")) .ServerOperation(false) ) ) </fieldset>

 

</form>

public IActionResult CreatePO() { ViewData["WorkflowStatusId"] = new SelectList(_ob.WorkFlowStatuses.ToList(), "WorkFlowStatusId", "Value"); ViewData["ApprovalStatusId"] = new SelectList(_ob.ApprovalStatuses.ToList(), "ApprovalId", "Value"); TempData["poId"] = _ob.Porequests.Max(x => x.Id + 1); return View(new Porequest()); } [HttpPost] //[ValidateAntiForgeryToken] public IActionResult CreatePO(Porequest porequest) { porequest.VendorId = (int)TempData["VenId"];//Insert breakpoint here to check for the values being passed by the view _ob.Add(porequest); _ob.SaveChanges(); return RedirectToAction(nameof(PurchaseOrders));

}

Script it is located here

<script>
    function index(dataItem) {
        var data = $("#PoMaterial").data("kendoGrid").dataSource.data();

        return data.indexOf(dataItem);
    }
</script>


Andi
Top achievements
Rank 1
Iron
Iron
 answered on 13 Oct 2023
1 answer
226 views

I have a grid with a Create button and Search field in the toolbar. I would like to add a count of the number of items in the grid. I am aware that it's possible to add paging to display the count and then disable it with:

PreviousNext(false).Numeric(false)

However, that results in wasted space because there's a row for the pager and count, and another row with the Create button and Search field.

Is it possible to add the item count to the custom toolbar so that everything is in in one row?

Thanks

Mihaela
Telerik team
 answered on 10 Oct 2023
0 answers
94 views
As of R3 2023 release, the font icons are detached from the themes css files. If you are still using font icons, make sure to include a reference to the font icons in your applications. You can read more information about the change in the following blog post: https://www.telerik.com/blogs/future-icons-telerik-kendo-ui-themes. It contains essential information about the change for all products and migration articles to svg icons.
Telerik Admin
Top achievements
Rank 1
Iron
 asked on 06 Oct 2023
1 answer
507 views

Hi

Can we achieve sticky header on the grid with page scroll instead of having a scrollbar within a grid.

If you refer to any example: https://demos.telerik.com/aspnet-core/grid they have one scrollbar for grid n one for page. Can we eliminate grid n display all data rows n have a sticky header as we goes down?

Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?