Telerik Forums
UI for ASP.NET Core Forum
2 answers
18 views
We are trying to implement the Kendo grid to replace our previous framework tool (c1).

Now I am stuck on creating a particular grid. The grid has a group header over 2 columns. In a row, the data of a property is represented as a cell (span) over 2 columns. Below this span are 2 properties in their own cell. This almost succeeds me with a ClientTemplate. However, I do not know how to use the properties from the row data.
When the group header is clicked the first propery sorts. The headers of 2 other columns sort their own property (column). 
In the picture, "naam" is the groups head. "Adres" and "Plaats" are the subcolumns.

How can I make this with the Kendo grid? I am mainly concerned with sorting the data behind the group header.

info
Top achievements
Rank 1
Iron
 answered on 03 Apr 2024
1 answer
12 views

I have a grid whose first column is a string column, and the 2nd and 3rd columns are sometimes dropdowns based on the value shown in the first column.

I have it mostly working except for a small issue. If I click slowly enough it seems to work but if i click around the different cells eventually my dropdown appears in a cell that it should not. What is the correct way to implement the described behavior?

Should I be looking for a cell template solution? Or do I need to subscribe to a custom grid event?

Any advice would be much appreciated.

 

Frank
Top achievements
Rank 1
Iron
 answered on 25 Mar 2024
1 answer
26 views

Below code needs to be corrected for ASP.NET Core Grid Popup Editing : 

https://demos.telerik.com/aspnet-core/grid/editing-popup?autoRun=true&theme=default-main-dark

.DataSource(dataSource => dataSource .Ajax() .PageSize(20) .Events(events => events.Error("error_handler")) .Model(model => model.Id(p => p.ProductID)) .Create(update => update.Action("EditingPopup_Create", "Grid")) .Read(read => read.Action("EditingPopup_Read", "Grid")) .Update(update => update.Action("EditingPopup_Update", "Grid")) .Destroy(update => update.Action("EditingPopup_Destroy", "Grid"))

 

It seems create arrow function is called for update & destroy as well.

while editing the row data EditingPopup_Create create is called instead of update !!

Anton Mironov
Telerik team
 answered on 25 Mar 2024
1 answer
16 views

This is probably just a request for a pointer to the documentation for older versions, which I couldn't find.  But the problem that I'm trying to solve is:

I'm trying to update some older software that uses Telerik.Web.UI 2015.2.826.45.  I'd like to add a client-side event handler that fires whenever the value of a RadComboBox is changed, whether by the user, or by server-side code.  The current doco quite clearly states that I want to use add_selectedIndexChanged, with the eventArgs parameter which is passed to that event containing the new selected item.  That function doesn't seem to exist in the version I'm using.  I tried adding a handler via the OnClientSelectedIndexChanged attribute of the ASPX element, and it handles an event when the user makes a change, but not when the server does.  And the arguments are in a completely different form.  Any idea how I do something equivalent in the older version?  Or where to find documentation that would apply to that version?

 

Thanks for any help

 

Rumen
Telerik team
 answered on 22 Mar 2024
1 answer
33 views

Hello Telerik,

I am using the Kendo Upload Control with Async AutoUpload set to "true".  In version 2023.3.1114, when using "Select File" to upload a document the control works perfectly.  Dragging and dropping a file onto the control also works perfectly. 

After upgrading to 2024.1.130 using "Select File" to upload a document does not work, but dragging and dropping a file does work to upload a document.

Can you please advise me as to what I am doing wrong.  I am using jQuery v3.7.0.

My client side code looks like the following:
@(Html.Kendo().Upload()
		.Name("uplCtrl")
		.HtmlAttributes(new { aria_label = "files", title = "Select file to upload" })
		.Multiple(false)
		.Messages(m => m.Select("Select file...")
		.DropFilesHere("Drop file here to upload"))
		.ShowFileList(false)
		.Async(a => a
			.Save("UploadSave", "Vendors")
			.AutoUpload(true)                                        
		)
		.Validation(validation =>
		{
			validation.AllowedExtensions(new string[] { "pdf", "docx", "xlsx", "zip" });
			validation.MaxFileSize(52428800);
		})
		.Events(e => e
			.Error("onUploadError")
			.Complete("onUploadSuccess")
			.Upload("onUpload")
		)
	)

Ivan Danchev
Telerik team
 answered on 21 Mar 2024
0 answers
19 views

Hello ,

We use the method ToDataSourceResult ( Telerik UI  for Asp.net Core 2024.1) and EF Core (8.0) to perform a simple query on a table. The primary key of the table is a String type and is case-sensitive. There are two pieces of data in our database. Their primary key values only differ in case.

ID: DEHE061800005DTF, Name: First

ID: DEHE061800005DTf, Name: Second

When we filter based on the primary key, we always get two pieces of data, but they are actually the same piece of data. In other words, another piece of data was not returned. Such as:

ID: DEHE061800005DTF, Name: First

ID: DEHE061800005DTF, Name: First

It seems that some kind of operation is performed internally according to the primary key, but because the case is not taken into account, the same piece of data is used twice.

We wanted to know if we could somehow solve this problem.

Thanks!

Lei
Top achievements
Rank 1
 asked on 20 Mar 2024
0 answers
19 views

I am working on a Net Core Mvc application for which I succesfully used Telerik UI. Everything was working fine, but after I added Mvc Areas and moved the views and controllers etc, the Telerik components stopped working.

I have found similar problems searching Google and the Telerik forum. For example:
https://www.telerik.com/forums/cannot-use-kendo-within-areas

However, that solution it not for ASP.NET Core. I was wondering what I have to do to make sure Telerik will work again in my Mvc Areas.

I am using the CDN to include the Kendo files.

<script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.3.1114/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2023.3.1114/js/kendo.aspnetmvc.min.js"></script>
<script src="~/js/kendo-ui-license.js"></script>

<script src="~/vendor/kendo/kendo.culture.nl-NL.min.js"></script>
<script src="~/vendor/kendo/kendo.messages.nl-NL.min.js"></script>
<script type="text/javascript">
    kendo.culture("nl-NL");
</script>
Any help is appreciated.
Jim
Top achievements
Rank 1
Iron
 updated question on 19 Mar 2024
0 answers
18 views
How can I solve the Enum filter uing same code but without using ItemTemplate or UI()

/View
columns.Bound(c => c.EmpTypes).Title("Type")
.Filterable(filterable => filterable
.Multi(true)
.ItemTemplate("typetemplate")
.DataSource(ds => ds.Read(r => r.Action("GetEmpTypes", "Report"))));

<script>
    function typetemplate(e) {
        return ({ Text, Value }) => `<span><label><span>${Text}</span><input type='checkbox' name='" + e.field + "' value='${Value}'/></label></span><br/>`
    }
</script>

//ReportController.cs
public JsonResult GetEmpTypes()
{
    var enumList = EnumToSelectList(typeof(EmpTypes)); // Convert the Enums to List<SelectListItem>
    return Json(enumList, JsonRequestBehavior.AllowGet);
}

public static List<SelectListItem> EnumToSelectList(Type enumType)
{
     return Enum
              .GetValues(enumType)
              .Cast<int>()
              .Select(i => new SelectListItem
              {
                  Value = i.ToString(),
                  Text = Enum.GetName(enumType, i),
              })
              .ToList();
}
Pol
Top achievements
Rank 1
Iron
 asked on 19 Mar 2024
1 answer
53 views

I'm upgrading to Kendo 2024.1.130 and I've been able to get svg icons on a button or other places using this construct.

<div class="ara-footer">
    <button class="k-button k-button-icontext" onclick="cancelEdit(id)">
        <span id="ericIcon"></span>
        Back
    </button>
</div>
<script>
    kendo.ui.icon($("#ericIcon"), { icon: 'camera' });
</script>

That worked flawlessly.  Thank you for the great example.

Now I'm trying to add svg icons to a Custom command in a grid.  This is the code I have previously when using font-icons.

Html.Kendo()
.Grid<TemplateModel>()
.Name("GridApprovedTemplates")
.Columns(columns =>
{

columns.Command(command => { command.Edit().Text(" ").UpdateText(" ").CancelText(" "); command.Custom(" ").Text("<span class='k-icon k-i-info'></span> ").Click("refreshApprovedTemplateDetail"); }).Width(150);

The code that worked for a single button doesn't work here because you can't have the same id on multiple places in the DOM.  How would I go about using an svg icon here?  (Let's use the camera one as an example).


Ivan Danchev
Telerik team
 answered on 19 Mar 2024
1 answer
25 views

Telerik UI for asp.net core 2024.1.130

I am trying to implement a grid popup with dropdown list in asp.net core (tag helper) , would like to know how to make this work.

List associated with dropdownlist will be available via a web api call.

please use the following sample as a starter, where we have popup with Frieght, order date, shipName, shipCity 

https://netcorerepl.telerik.com/QoYdOJlL07aiiORy37

I would like to convert shipCity from text box to dropdown list, where i get the list of cities using a web api call.

Could you please help me with this implementation? (if there is already another sample which demonstrates this, that would be fine as well)

 
Anton Mironov
Telerik team
 answered on 18 Mar 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?