Telerik Forums
UI for ASP.NET Core Forum
2 answers
193 views

We have to used translated menu text from a resource bundle. For the localization we inject the IHtmlLocalizer in our Razor-Pages.

Following code doesn't work.

                                <kendo-menu name="customermenu">
                                    <items>
                                        <menu-item text='@localizer_Label["Lable_MyTeam"]'></menu-item>
                                    </items>
                                </kendo-menu>

 

How can I localize my menu text?

Many thanks for your efforts,

Christian

Christian
Top achievements
Rank 1
 answered on 05 Apr 2021
4 answers
322 views

Is there anyway to stop the inline editor from closing if there are errors? It currently closes the editor after clicking ok on the alert.

Here is my error event handler: 

function errorHandler(e) {
    if (e.errors) {
        var message = "There are some errors:\n";
        // Create a message containing all errors.
        $.each(e.errors, function (key, value) {
            if ('errors' in value) {
                $.each(value.errors, function () {
                    message += this + "\n";
                });
            }
        });
 
        alert(message);
    }
n/a
Top achievements
Rank 1
 answered on 02 Apr 2021
3 answers
2.7K+ views

Hello,

How to change the Grid row color to be color 1 in even number rows, and color2 in odd number rows.

Thanks!

Nikolay
Telerik team
 answered on 02 Apr 2021
18 answers
363 views

Hello,

I'm working with a DropDownTree which I create with the following code:

01.@(Html.Kendo().DropDownTree()
02.    .Name("selectJobs")
03.    .DataValueField("id")
04.    .DataTextField("text")
05.    .HtmlAttributes(new
06.    {
07.        @class = "form-control"
08.    })
09.    .Filter(FilterType.Contains)
10.    .LoadOnDemand(false).MinLength(2)
11.    .BindTo((IEnumerable<DropDownTreeItemModel>)ViewBag.inlineDefault)
12.    .Events(e => e.Change("onJobChanged").DataBound("onJobDataBound"))
13.    .Template("#= autocompleteFormatValue(data.item.text, 'selectJobsFilter') #")
14.)

There is a way to change the content data of this tree, through an ajax call and when it completes, the following code is exeuted:

01.function (response) {
02.    var ds = new kendo.data.HierarchicalDataSource({
03.        data: response,
04.        accentFoldingFiltering: "fr-FR"
05.    });
06.    var dropdowntree = $('#selectJobs').data('kendoDropDownTree');
07.    dropdowntree.setDataSource(ds);
08.    dropdowntree.treeview.expand(".k-item");
09.}

I believe I am using the 'accentFoldingFiltering' option properly, as per https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/accentfoldingfiltering

Yet, the diacritics filtering is not working. Any idea what is missing ?

For instance I would have the items you can see on my example1.png picture. And so I would expect that if I pressed e, which I do in example2.png, then I would see all the items that match "matie" including "matiè" but as you can see that's not the case.

Thanks!

 

saad
Top achievements
Rank 1
 answered on 01 Apr 2021
3 answers
116 views

If I select the text of a disabled combobox with double click and make copy paste the results text has line feed...

why this?

robert

Neli
Telerik team
 answered on 01 Apr 2021
3 answers
285 views

Last week i migrated one of the projects i work on from .NET MVC to .NET Core. 
It surprised me that the .NET Core wrappers lack the security trimming feature that the MVC wrappers support. I voted for this feautre request, but that can take ages before it gets implemented (if ever). 
So i'm looking for a work around. Is there anybody out there that could give me some advice?

 

I used the .Action("actionname", "controllername") method of the menu item to get the securitytrimming going.

Ivan Danchev
Telerik team
 answered on 01 Apr 2021
7 answers
3.0K+ views

Hi there
Is there anyway to set the PDF VIewer zoom to 'Fit to Width' instead of 'Automatic Width' on startup?

Thanks

Richard

 

 

 

Sotiris
Top achievements
Rank 1
Veteran
Iron
 answered on 30 Mar 2021
1 answer
121 views
Is it possible to change the look of the first, previous next and last buttons to a string representation instead of the < << >> > buttons? If so can someone point me to some resource that shows how to do it? 
Anton Mironov
Telerik team
 answered on 29 Mar 2021
1 answer
303 views
Hi, 
i use nested grid. The inner grid too (grid name:  YemekTipGrid_#=Id#) I want to create a dynamic button

columns.Bound(b => b.Id).Width(205).Title(Localizer["View_Common_Operation"]).ClientTemplate("#=operationButtonsInner(data)#");
this works fine for the grid above.Seems to work for the inner grid but the data of the above grid is coming
shown in telerikforum_3.jpg.  data-id = 2 seen here is the first address of the upper grid. However, the expected value is 7 instead of 2 How can I get the PK IDs of the grid object at the bottom

@(Html.Kendo().Grid<ListYemekTipDto>()
              .Name("YemekTipGrid")
              .Columns(columns =>
              {
                  //columns.Bound(b => b.Id).Title("").ClientHeaderTemplate("<input type='checkbox' id='ck-check-all' />").ClientTemplate(("<input type='checkbox' selector=#=ID# class='ck-secim' ID='#=ID#' name='Sec' />")).Filterable(false);
                  columns.Bound(b => b.Tip).Title(Localizer["View_YemekTip_Model_Tip"]);
                  columns.Bound(b => b.Ucret).Title(Localizer["View_YemekTip_Model_Ucret"]);
                  columns.Bound(b => b.ParentYemekTipId).Title(Localizer["View_YemekTip_Model_ParentId"]);
                  columns.Bound(b => b.Not).Title(Localizer["View_YemekTip_Model_Not"]);
                  columns.Bound(b => b.Aciklama).Title(Localizer["View_YemekTip_Model_Aciklama"]);

                  columns.Bound(b => b.KayitDurumu).Title(Localizer["View_Common_KayitDurumu"]).Width(50).ClientTemplate("<span id='badge_#=Id#' class='badgeTemplate'></span>");
                  columns.Bound(b => b.Id).Width(205).Title(Localizer["View_Common_Operation"]).ClientTemplate("#=operationButtons(data)#");
              })
              .ToolBar(toolbar =>
              {
                  toolbar.Search().Text(Localizer["Grid_Common_Search"]);
                  //toolbar.Excel().Text(Localizer["Grid_Common_Excel"]);
                  //toolbar.Pdf().Text(Localizer["Grid_Common_Pdf"]);
                  //toolbar.Custom().Text(Localizer["Grid_Common_NewRecord"]).IconClass("fa fa-plus").HtmlAttributes(new { @class = "modal-action", data_type = "get", data_url = Url.Action("Ekle", "YemekTip", new { area = "Yonetim" }), data_grid = "#YemekTipGrid", data_title = Localizer["View_Common_CreateOperation"], data_buttons = "true", data_savetext = Localizer["View_Common_Create"] });
              })
              .Pageable()
              .Sortable()
              .Filterable()
              .Navigatable()
              .ColumnMenu()
              .ClientDetailTemplateId("templateInner")
              .HtmlAttributes(new { style = "height:430px;" })
              .Resizable(r => r.Columns(true))
              .Reorderable(r => r.Columns(true))
              .Groupable(g => g.ShowFooter(false))
              //.Events(events => events.DataBound("onDataBound"))
              .DataSource(dataSource => dataSource
                .Ajax()
                .Batch(true)
                .PageSize(15)
                .AutoSync(true)
                .ServerOperation(false)
                .Events(events => events.Error("error_handler"))
                .Read(read => read.Action("Grid", "YemekTip", new { area = "Yonetim" }).Type(HttpVerbs.Post))
              ).Events(events => events.DataBound("dataBound"))
              )

    <script id="templateInner" type="text/kendo-tmpl">
        @(Html.Kendo().Grid<ListYemekTipDto>()
                .Name("YemekTipGrid_#=Id#")
                .Columns(columns =>
                {
                    columns.Bound(b => b.Tip).Title(Localizer["View_YemekTip_Model_Tip"]);
                    columns.Bound(b => b.Ucret).Title(Localizer["View_YemekTip_Model_Ucret"]);
                    columns.Bound(b => b.ParentYemekTipId).Title(Localizer["View_YemekTip_Model_ParentId"]);
                    columns.Bound(b => b.Not).Title(Localizer["View_YemekTip_Model_Not"]);
                    columns.Bound(b => b.Aciklama).Title(Localizer["View_YemekTip_Model_Aciklama"]);
                    //columns.Bound(b => b.KayitDurumu).Title(Localizer["View_Common_KayitDurumu"]).Width(50).ClientTemplate("<span id='badge_#=Id#' class='badgeTemplate'></span>");

                    columns.Bound(b => b.Id).Width(205).Title(Localizer["View_Common_Operation"]).ClientTemplate("#=operationButtonsInner(data)#");

                })
                .DataSource(dataSource => dataSource
                    .Ajax()
                    .Batch(true)
                    .PageSize(15)
                    .AutoSync(true)
                    .ServerOperation(false)
                    .Events(events => events.Error("error_handler"))
                    .Read(read => read.Action("HierarchyBindingGrid", "YemekTip", new { area = "Yonetim", Id = "#=Id#" }).Type(HttpVerbs.Post)))
                    .Pageable()
                    .Sortable()
                    .Filterable()
                    .Navigatable()
                    .ColumnMenu()
                    .Resizable(r => r.Columns(true))
                    .Reorderable(r => r.Columns(true))
                    .Groupable(g => g.ShowFooter(false))
                    .Events(events => events.DataBound("dataBound"))
                .ToClientTemplate()
        )
    </script>

   function operationButtonsInner(data) {
            console.log("operationButtonsInner",data);
           var template = "";

            template += "<a class='btn btn-default btn-outline btn-xs modal-action mr-5' data-toggle='modal' data-rel='tooltip' data-placement='top' title='@Html.Raw(Localizer["View_Common_UpdateOperation"])' data-url='" + guncelleUrl + "' data-type='get' data-id='" + data.Id +"' data-title='@Html.Raw(Localizer["View_Common_UpdateOperation"])'  data-savetext='@Html.Raw(Localizer["View_Common_Update"])' data-buttons='true'><i class='fa fa-pencil' aria-hidden='true'></i></a>";
            template += "<a class='btn btn-default btn-outline btn-xs modal-action mr-5' data-toggle='modal' data-rel='tooltip' data-placement='top' title='@Html.Raw(Localizer["View_Common_DeleteOperation"])' data-url='" + silUrl + "' data-type='delete' data-id='" + data.Id +"' data-title='@Html.Raw(Localizer["View_Common_DeleteOperation"])'  data-savetext=' @Html.Raw(Localizer["View_Common_Delete"])' data-message='@Html.Raw(Localizer["View_Common_Delete_Message"])'><i class='fa fa-trash' aria-hidden='true'></i></a>";
            template += "<a class='btn btn-default btn-outline btn-xs modal-action mr-5' data-toggle='modal' data-rel='tooltip' data-placement='top' title='@Html.Raw(Localizer["View_Common_PreviewOperation"])' data-url='" + goruntuleUrl + "' data-type='get' data-id='" + data.Id + "' data-title='@Html.Raw(Localizer["View_Common_PreviewOperation"])'><i class='fa fa-eye' aria-hidden='true'></i></a>";

            if (data.KayitDurumu == @((int)EntityStatus.ACTIVE))
            {
                template += "<a class='btn btn-default btn-outline btn-xs modal-action mr-5' data-toggle='modal' data-rel='tooltip' data-placement='top' title='@Html.Raw(Localizer["View_Common_PassiveOperation"])' data-type='put' data-url='" + durumDegistirUrl + "' data-id=" + data.Id + " data-value='" + @((int)EntityStatus.PASSIVE) + "' data-title='@Html.Raw(Localizer["View_Common_PassiveOperation"])' data-message='@Html.Raw(Localizer["View_Common_PassiveMessage"])' data-savetext='@Html.Raw(Localizer["View_Common_PassiveOperation"])' ><i class='fa fa-unlock' aria-hidden='true'></i></a>";
            }
            if (data.KayitDurumu == @((int)EntityStatus.PASSIVE))
            {
                template += "<a class='btn btn-default btn-outline btn-xs modal-action mr-5' data-toggle='modal' data-rel='tooltip' data-placement='top' title='@Html.Raw(Localizer["View_Common_ActiveOperation"])' data-type='put' data-url='" + durumDegistirUrl + "' data-id=" + data.Id + " data-value='" + @((int)EntityStatus.ACTIVE) + "' data-title='@Html.Raw(Localizer["View_Common_ActiveOperation"])' data-message='@Html.Raw(Localizer["View_Common_ActiveMessage"])'  data-savetext='@Html.Raw(Localizer["View_Common_ActiveOperation"])' ><i class='fa fa-lock' aria-hidden='true'></i></a>";
            }
            return template;
         }
 
Nikolay
Telerik team
 answered on 26 Mar 2021
4 answers
198 views

Is there a way to configure steps server-side, like you can with the grid via LoadSettings?

If not, how do you configure the steps dynamically?

For example if the configuration of the steps comes from a database?

Stoyan
Telerik team
 answered on 25 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?