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

Hi

I have a form component, and ideally I'd like to embed some custom HTML within it alongside one of the fields.

For example pseudo code for if this sort of thing was possible :

items.Add()
.Field(f => f.Task.StartDate)
.Label(l => l.Text("Call Date"))
.Editor(e =>
{
	e.DateTimePicker()
	.Size(ComponentSize.Small)
	.Format("{0:dd/MM/yyyy HH:mm}")
	.Min(DateTime.Now)
	.DateInput();
});

items.Add()
.ClientTemplate(<ul><li><a href="test1">A Link</a></li><li><a href="test2">Another Link</a></li></ul>);
How do I achieve injecting my own HTML into the form layout please?
Mihaela
Telerik team
 answered on 03 Mar 2025
0 answers
26 views

Hi support team,

 

sadly, we ran out of support so I'll try the forum for help.

 

We have bound column

 


   columns.Bound(c => c.BusinessPartner.Name).Title("Customer").Groupable(true)
       .Filterable(f => f.Multi(false).Search(true).Cell(c => c.ShowOperators(false).Operator("startswith"))).Width(250)
       .ClientTemplate(@"
           #= data.BusinessPartner.Number # #= data.BusinessPartner.Name #
           #if (data.BusinessPartner.PostalAddress != null) {#
               <span class='d-flex'> (#= data.BusinessPartner.PostalAddress.City #)</span>
           #}#");

 

From now on the filter using "startswith" is broken. Let me explain. Yesterday when entering "e" it displays all customers starting with "e". But suddenly some customers are not shown any more. Yesterday the list contained two entries and today only 1 entry any more.

I examined the SQL query behind the scenes but this is ok.

What could be wrong here?

Stefan
Top achievements
Rank 1
Iron
Iron
Iron
 asked on 25 Feb 2025
1 answer
25 views

I'm using a grid with filter multi checkboxes. I created a custom download for version 2025.1.211 with the Editing, Filtering, Row filter, and Paging  grid options checked.

When the filter button is clicked, the filter window is cut off by the 2nd row in the grid.

If I change the layout to reference kendo.all.min.js instead of kendo.custom.min.js it works fine. Is there a dependency for the row filter that is not being automatically checked?

Thank you

Anton Mironov
Telerik team
 answered on 24 Feb 2025
2 answers
22 views

When using the orgchart for a large set of nodes (2000+) it can be cumbersome to find where you are when a node is expanded. Is there a way to keep the just expanded node selected?

I've added an event handled to the Expand event which is called correct.


<script>
    function onExpand(e) {
//        alert("event: Expand --> " + e.dataItems[0].title + " expanded");
        alert(e.dataItems[0].id);
        var orgChart = $("orgChart").getKendoOrgChart();
        orgChart.select(e.dataItems[0]);
    }    
</script>

 

The alert fires with the correct id but dosen't seem to select the node that was clicked. I'd like to have that selected so the end user doesn't lose their place as the orgchart expands. Thanks!

 

Ivaylo
Telerik team
 answered on 20 Feb 2025
1 answer
23 views

Hi,

We're using the org chart component and the data binding works great and we love the template capabilty. But the org only uses a portion of the width of the display and as we have a large organization it would be better if it could use the full amount. I tried this:

.HtmlAttributes(new {style="width:100%"})

but it didn't seem to change anything. What am I missing on this? Thanks!

Ivan Danchev
Telerik team
 answered on 19 Feb 2025
1 answer
19 views
I'm a bit blown away that with all the demos that Telerik displays to feature these components, outside of DataGrid, you can't find an example on how to save user input.  I mean, we're not building static websites, guys. 

So, I've successfully fed data to a Dialog with a nested CheckboxGroup.  My checkboxes appear with labels supplied by the data.  If a user makes changes to the checkbox selections, I want to persist those changes when they click on the Dialog's "Save" button.  How do I persist the data back to the controller?  There's plenty of explanations for DataGrid, but, what about all the other components, like CheckboxGroup/Dialog.

Thanks in advance
Anton Mironov
Telerik team
 answered on 19 Feb 2025
1 answer
28 views

Hi Telerik,

To start, I will say this, yes I am using the danish language pack.

I am using the rich text editor and encountering issues with how it treats foreign language letters. I am based in Denmark, so when we have danish texts that include letters such as æ, ø, å, kendo seem to be translating them into a it's own letter combo.

This is a problem, because it is being saved like this in the database as well as, when I get the response, it does not translate it back to danish letters it stays as a weird letter dump.

Also consider that the data that is saved in the DB is later used in other places, therefore even if kendo would change it back for viewing, the fact that, this is how it is saved in the DB is a huge problem.

I attached some pictures for reference.

Thanks in advance,
Juste

Ivaylo
Telerik team
 answered on 12 Feb 2025
1 answer
37 views

In the attached image is a data entry screen from a grid.  It is displayed on a mobile device.   How can I change the <save> and <cancel> to a button so that it is more obvious to our users of where to click to <save> or <cancel> from this data entry point?  Or do you have any other suggestions to help in this situation?

Thanks

-Maria

Mihaela
Telerik team
 answered on 06 Feb 2025
0 answers
22 views

Hi,
I am trying to implement telerik components in my Sitefinity site, the components seems to work fine, but when i add the 3er part of the documentation, gives me an error call "Invalid template", any ideas what could be the problem? https://docs.telerik.com/aspnet-core/html-helpers/layout/tilelayout/getting-started.

PS: For more context, i made the component as a widget in Sitefinity, also the 2nd step of the documentation works fine, all the CSP security allows scripts like in the example(i made a component that use scripts and works fine).

This code works,

    @addTagHelper *, Kendo.Mvc

<kendo-tilelayout name="tilelayout" columns="2">
    <containers>
        <container>
            <container-body-template>Container 1</container-body-template>
            <container-header text="Title 1" />

        </container>
        <container>
            <container-body-template>Container 2</container-body-template>
            <container-header text="Title 2" />
        </container>
        <container>
            <container-body-template>Container 3</container-body-template>
            <container-header text="Title 3" />
        </container>
    </containers>
</kendo-tilelayout>

This code doesn't work,

@addTagHelper *, Kendo.Mvc



<script id="tabStripContainer" type="text/html">
    <kendo-tabstrip name="tabstrip" is-in-client-template="true">
        <items>
            <tabstrip-item text="Dashboard Information" selected="true">
                <content>
                    <div class="status-cards">
                        <div class="k-card">
                            <div class="k-card-body">
                                <div class="k-card-result on-track-tasks">22</div>
                                <div class="k-card-title">Items in Backlog: 43</div>
                            </div>
                        </div>
                        <div class="k-card">
                            <div class="k-card-body">
                                <div class="k-card-result overdue-tasks">7</div>
                                <div class="k-card-title">From Yesterday: 16</div>
                            </div>
                        </div>
                        <div class="k-card">
                            <div class="k-card-body">
                                <div class="k-card-result issues">47</div>
                                <div class="k-card-title">Closed By Team: 15</div>
                            </div>
                        </div>
                    </div>
                </content>
            </tabstrip-item>
            <tabstrip-item text="Calendar">
                <content>
                    <div class="calendar-widget">
                        <kendo-calendar name="calendar" component-type="modern" is-in-client-template="true"></kendo-calendar>
                    </div>
                </content>
            </tabstrip-item>
        </items>
    </kendo-tabstrip>
</script>
<kendo-tilelayout name="tilelayout" columns="1">
    <containers>
        <container body-template-id="tabStripContainer"></container>
    </containers>
</kendo-tilelayout>



Mateo
Top achievements
Rank 1
 asked on 05 Feb 2025
2 answers
43 views
Im having difficulty making customizations to my grid. Ive left my commented out code in there for some items I have tried and didnt work. Ive listed out below what I am trying to do. Any help would be greatly appreciated
  1. Trying to give PartyRoleOverride a drop down list on edit
  2. Trying to make fields not editable. Code is currently in there below and just does nothing
  3. Make fields not required. All fields are currently required and did not specify required anywhere but only see how to make things required?
  4. Making isProSe field show as a yes/no rather than true false
    @page
    @addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@Html.AntiForgeryToken()

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2024.4.1112/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2024.4.1112/js/kendo.aspnetmvc.min.js"></script>
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/themes/10.0.1/default/default-ocean-blue.css">

                   <div id="parties-scheduling" style="margin-right:8px;border:none;padding:0;color:black;">
                        <div id="PartiesTopRowInfo">
                            @Html.Kendo().Grid(Model.MiscellaneousInfo.PartyInfoList).Name("PartyGrid").ToolBar(x => 
                              x.Create()).Size(ComponentSize.Small).Editable(GridEditMode.PopUp).Resizable(r => r.Columns(true)).Columns(col =>
                             {                                
                                 col.Bound(c => c.Name.BuiltName).Title("Name").Width(175);
                                 col.Bound(c => c.PartyRole).Title("Role").Width(150);
                                 //col.Bound(c => c.PartyRoleOverride).Title("Role Override").Width(150).EditorTemplateName("rolesEditor");
                                 // col.Bound(c => c.PartyRoleOverride).Title("Role Override").Width(150).ClientTemplate("#=rolesEditor#");
                                     // col.Bound(c => c.PartyRoleOverride).Title("Role Override").Width(150).EditorTemplateComponentName("rolesEditor"); 
                                 col.Bound(c => c.PartyRoleOverride).Title("Role Override").Width(150);
                                 col.Bound(c => c.AppearanceType).Title("Appear Type").Width(100);
                                 col.Bound(c => c.Timely).Width(60);
                                 col.Bound(c => c.ServiceType).Width(150);
                                 col.Bound(c => c.DateServed).Width(100);
                                     col.Bound(c => c.isProse).Title("ProSe").Width(55);/* .ClientTemplate("#= MyBool ? 'Yes' : 'No' #"); */
                                 col.Command(c => 
                                 {
                                     c.Edit();
                                     c.Destroy();
                                 }).Width(170);
                             }).Sortable().DataSource(dataSource =>dataSource
                             .Ajax()
                             .Read(r => r.Url("/Appearances/MiscellaneousInformation?handler=Read").Data("forgeryToken"))
                             .Update(r => r.Url("/Appearances/MiscellaneousInformation?handler=Update").Data("forgeryToken"))
                             .Create(r => r.Url("/Appearances/MiscellaneousInformation?handler=Create").Data("forgeryToken"))
                             .Destroy(r => r.Url("/Appearances/MiscellaneousInformation?handler=Destroy").Data("forgeryToken"))
                              .Model(m => m.Id(id => id.PartyAppearanceID))
                              .Model(m => m.Field(party => party.PartyRole).Editable(false))
                              .Model(m => m.Field(party => party.PartyRoleOverride).Editable(false))
                              .Model(m => m.Field(party => party.Name.BuiltName).Editable(true))
                              .Model(m => m.Field(party => party.isProse).Editable(false))
                              // .Model(m=> m.Field(party => party.PartyRoleOverride).DefaultValue(new List<String>{
                              //     "Role1","Role2","Role3"
                              // }))
                              )
                              
                         </div>
                    </div>

 function rolesEditor(container, options) {
     $('<input name="PartyRoleOverride" style="width:300px;">')
         .appendTo(container)
         .kendoDropDownList({
             autoBind: false,
             dataTextField: "RoleDesc",
             dataValueField: "RoleID",
             dataSource: {
                 data: roles
             }
         });
 }

var roles = [{
     "RoleID": 1,
     "RoleDesc": "Administrator"
 }, {
     "RoleID": 2,
     "RoleDesc": "Bank"
 }, {
     "RoleID": 3,
     "RoleDesc": "Guardian"
 }];


public class MiscellaneousInformationModel : PageModel
    {
        public CoreFileInfoObj CoreFileInfoObj { get; set; } = new CoreFileInfoObj();
        public SharedFunctions sharedFunctions { get; set; }

        [BindProperty]
        public MiscellaneousInfoDTO MiscellaneousInfo { get; set; } = new MiscellaneousInfoDTO();
}




    public class MiscellaneousInfoDTO
    {
        public List<PartyInfoDTO> PartyInfoList { get; set; }

    }


public class PartyInfoDTO
{
    public int PartyAppearanceID { get; set; }

    public NameDTO Name { get; set; }

    public string PartyRole { get; set; }

    public string PartyRoleOverride { get; set; }

    public string AppearanceType { get; set; }

    public Boolean Timely { get; set; }

    public string ServiceType { get; set; }

    public DateTime? DateServed { get; set; }

    public Boolean isProse { get; set; }
}


    public class NameDTO
    {
        public NameDTO()
        {

        }

        public string FirstName { get; set; }

        public string MiddleName { get; set; }
        public string LastName { get; set; }

        public string Organization { get; set; }

        public string Suffix { get; set; }

        public string BuiltName { get; set; }

    }

 

Alexander
Telerik team
 answered on 04 Feb 2025
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?