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

Hello guys,

is it possible to display a warning on the scheduler when Update action is triggered? It happens often that users change the dates by mistake when using scheduler (they drag and drop or expand).

    Thanks.

    Boris
    Top achievements
    Rank 1
    Iron
    Iron
     answered on 29 Jul 2021
    1 answer
    885 views

    I have a slider on a page set to a min/max of 0 and 100.   The min/max of this slider is variable and changes depending on what a user has selected in a dropdownlist.  For example, when the user selects an item in the dropdownlist, I change the slider's min/max value of 10 and 50 using setOptions.

     var slider = $("#slider").data("kendoSlider");
                    slider.setOptions({
                        min: 10,
                        max: 50,
                        smallStep: 1,
                        largeStep: 5,
                        value: 10
                    });

    slider.resize();

    This seems to work as the slider updates to the properties I set in setOptions.  But after I do this, it doesn't consistently let me jump to a value in the slider.   For example, if I try to click the slider line at 40, the slider won't move to it.  Sometimes it will, sometimes it won't.   If I drag the slider ball to a number it works fine, if I user the increase/decrease arrow buttons it works fine.  But clicking on a number in the slider bar does not work.  

    - This jumping to a number in the slider works fine before I dynamically change the properties using "setOptions".
    - This problem occurs regardless of what property in the slider I change using "setOptions". 

    Any ideas? Thanks.

    Stoyan
    Telerik team
     updated answer on 27 Jul 2021
    3 answers
    833 views

    Hi,

    I am trying to change the culture for the PDFViewer page of the AspNet.Core example, but it is not working. I have searched this forum and all the documentation available with no success. This is the code I am puting at the beginning of the page:

    @section scripts{

        <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"></script>
        <script>
            window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js';
        </script>
        <script src="~/lib/kendo/js/jquery.js"></script>
        <script src="~/lib/kendo/js/kendo.all.min.js"></script>
        <script src="~/lib/kendo/js/cultures/kendo.culture.pt-BR.min.js"></script>

    }

    <script type="text/javascript">
        //set the Kendo UI culture
        kendo.culture("pt-BR");
    </script>

    It should work, but the page still shows up with the english language.

    I would appreciate any help.

     

    Patrick | Technical Support Engineer, Senior
    Telerik team
     answered on 27 Jul 2021
    1 answer
    450 views

    Hi,

    I have a Filter Control combined with a Grid Control.
    Both are linked to the same Kendo Datasource.

    Everything works like a charm

    Now I want to set up a enum list for a field in the Filter Control, but I was unable to figure out how. (only free text works in the Filter Control)

    The data source is gigantic, the filters in the filter control must be set before calling the data and as there are some fields like "business type" I want to show all possible values, without having each user memorize each possible value for each enum field.

    What I want works with the datagrid filter once the datagrid is populated from the datasource, but it's impossible to load all the data and therefore I need the filter control.
    (If there is another way, I am open to it)

    Is this possible?

    Is there some documentation I missed?

     

    Mihaela
    Telerik team
     answered on 27 Jul 2021
    1 answer
    321 views

    I can not figure out how I can pass a function for content in an Asp.net core to tooltip.  In the JQuery examples you can do something like this:

        $("#Name").kendoTooltip({
            content: function (e) {
                return $(e.target).data('tooltip');
            }
        })
    I have been trying to pass a function to the htmlhelper and can not figure it out.  I have tried passing with events, and puting a function in the content.  I have no joy.
    @(Html.Kendo().Tooltip()
        .For("#Name")
        .AutoHide(true)
        .Position(TooltipPosition.Top)
        .Content("TEST TEST")
        .Width(120)
        //.Events(events => events.ContentLoad("showTooltip"))
        )
    Also can I use a class in the For, like .For(".form-tooltip")?
    Ivan Danchev
    Telerik team
     answered on 26 Jul 2021
    12 answers
    6.6K+ views

    Hi all,

    Is anyone else seeing the error below?  I get it at runtime when CreateHostBuilder(args).Build().Run() is called.

     

    System.AggregateException
      HResult=0x80131500
      Message=Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: Kendo.Mvc.Rendering.IKendoHtmlGenerator Lifetime: Transient ImplementationType: Kendo.Mvc.Rendering.KendoHtmlGenerator': Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.)
      Source=Microsoft.Extensions.DependencyInjection
      StackTrace:
       at Microsoft.Extensions.DependencyInjection.ServiceProvider..ctor(IEnumerable`1 serviceDescriptors, ServiceProviderOptions options)
       at Microsoft.Extensions.DependencyInjection.ServiceCollectionContainerBuilderExtensions.BuildServiceProvider(IServiceCollection services, ServiceProviderOptions options)
       at Microsoft.Extensions.DependencyInjection.DefaultServiceProviderFactory.CreateServiceProvider(IServiceCollection containerBuilder)
       at Microsoft.Extensions.Hosting.Internal.ServiceFactoryAdapter`1.CreateServiceProvider(Object containerBuilder)
       at Microsoft.Extensions.Hosting.HostBuilder.CreateServiceProvider()
       at Microsoft.Extensions.Hosting.HostBuilder.Build()
       at GariboldiApp.Program.Main(String[] args) in D:\Project Consultants\JV\git_work\Garibaldi\Gariboldi\GariboldiApp\Program.cs:line 16

    Inner Exception 1:
    InvalidOperationException: Error while validating the service descriptor 'ServiceType: Kendo.Mvc.Rendering.IKendoHtmlGenerator Lifetime: Transient ImplementationType: Kendo.Mvc.Rendering.KendoHtmlGenerator': Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

    Inner Exception 2:
    TypeLoadException: Could not load type 'Microsoft.AspNetCore.Mvc.Internal.ClientValidatorCache' from assembly 'Microsoft.AspNetCore.Mvc.Core, Version=3.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'.

     

    Many thanks!

    Jerry Tennison


    Russell Haley
    Top achievements
    Rank 1
    Iron
    Iron
    Iron
     answered on 22 Jul 2021
    1 answer
    134 views

    I have an issue while enabling headerview in the tree list as per picture 1. If I disable it works fine, but if I need to enable it to make the title clear I get an error as per picture 2

     

     

    Aleksandar
    Telerik team
     answered on 20 Jul 2021
    0 answers
    143 views
    hello
    Rahul
    Top achievements
    Rank 1
     updated question on 20 Jul 2021
    1 answer
    210 views

    <p>For a .netcore 3.1 web application I have a grid using grideditmode.inline and the columns are loaded using columns.LoadSettings(Model.columns)</p><p>The width of the editable columns is set in the Model.columns but no matter how I change the size, it always displays the same width.&nbsp; The width is too small in either state (editable or view) that you cannot see a full number if it is longer than 4 characters.</p><p>The columns that are set to not editable seem to follow the column width setting as passed in the columns.LoadSettings(Model.columns).&nbsp; I set the first editable field to a ridiculously large number and it made no difference.</p><p>What am I missing?</p><p>&nbsp;</p><p>&nbsp;</p>

    This is a snippet of the columns - only showing a section for brevity since it is over 40 columns total (only half are visible.)

         IList<GridColumnSettings> columns = new List<GridColumnSettings>
            {
                new GridColumnSettings
                {
                    Member = "rowId",
                    //Member = "rowId",
                    Title = "Row Id",
                    Visible = false
                    //Locked = true
                },
                new GridColumnSettings
                {
                    Member = "fgid",
                    Visible = false
                },
                new GridColumnSettings
                {
                    Member = "PartNumber",
                    //Member = "PartNumber",
                    Title = "Part",
                    Width = "150px",
                    Filterable = true,
                    //Visible = true,
                    Locked = true
                },
                new GridColumnSettings
                {
                    Member = "currentMon1",
                    Title = titles[0],
                    Visible = true,
                    Width = "500px",
                    Filterable = false,
                    Locked = false
                },
                 new GridColumnSettings
                {
                    Member = "currentMon1Id",
                    Title = "Mon1Id",
                    Visible = false
                },

     

     

     

    this is the grid:

      @(Html.Kendo().Grid<PartRowView>().Name("grid1")
            .Sortable()
            .Editable(x => x.Mode(GridEditMode.InLine))
            .Scrollable()
            .Filterable()
            .Resizable(r => r.Columns(true))
            .ToolBar(tools => tools.Excel().IconClass("k-icon k-i-download"))
            .Excel(excel => excel
                 .FileName(Model.filename)
                 .Filterable(true)
                .AllPages(true)
                .ProxyURL("/forecast/TestPage?handler=Save")
              )
            .Columns(columns => columns.LoadSettings(Model.columns)
            )
        .DataSource(ds => ds.Ajax()
        .Events(events => events.Error("errors_handler"))
        .ServerOperation(false)
        .Read(r => r.Url(Url.Action() +"?handler=Read").Data("forgeryToken"))
        .Update(u => u.Url(Url.Action() +"?handler=Update").Data("forgeryToken"))
        .Model(model =>
        {
            model.Id(p => p.rowId);
            model.Field(p => p.PartNumber).Editable(false);
            model.Field(p => p.currentMon1Id).Editable(false);
            model.Field(p => p.currentMon2Id).Editable(false);
            model.Field(p => p.currentMon3Id).Editable(false);
            model.Field(p => p.currentMon4Id).Editable(false);
            model.Field(p => p.currentMon5Id).Editable(false);
            model.Field(p => p.currentMon6Id).Editable(false);
            model.Field(p => p.currentMon7Id).Editable(false);
            model.Field(p => p.currentMon8Id).Editable(false);
            model.Field(p => p.currentMon9Id).Editable(false);
            model.Field(p => p.currentMon10Id).Editable(false);
            model.Field(p => p.currentMon11Id).Editable(false);
            model.Field(p => p.currentMon12Id).Editable(false);
            model.Field(p => p.currentMon13Id).Editable(false);
            model.Field(p => p.currentMon14Id).Editable(false);
            model.Field(p => p.currentMon15Id).Editable(false);
            model.Field(p => p.currentMon16Id).Editable(false);
            model.Field(p => p.currentMon17Id).Editable(false);
            model.Field(p => p.currentMon18Id).Editable(false);
        })
            .PageSize(100)
        )
        .Pageable()
    )

    Aleksandar
    Telerik team
     answered on 20 Jul 2021
    2 answers
    623 views

    In the following example, the width of the filter boxes are much bigger than the data for that column.  For example, the max number of digits for Order ID is 5.  Therefore, the filter box only needs to be wide enough to hold 5 digits. 

    https://demos.telerik.com/aspnet-core/grid/filter-row

     

    How do you reduce the width of the filter boxes?

     

    Thanks,

    Robert

    Robert
    Top achievements
    Rank 1
    Iron
     answered on 19 Jul 2021
    Narrow your results
    Selected tags
    Tags
    +? more
    Top users last month
    Cynthia
    Top achievements
    Rank 1
    Iron
    Toby
    Top achievements
    Rank 3
    Iron
    Iron
    Iron
    Danielle
    Top achievements
    Rank 1
    Iron
    Iron
    Joel
    Top achievements
    Rank 3
    Bronze
    Bronze
    Iron
    yw
    Top achievements
    Rank 2
    Iron
    Iron
    Iron
    Want to show your ninja superpower to fellow developers?
    Top users last month
    Cynthia
    Top achievements
    Rank 1
    Iron
    Toby
    Top achievements
    Rank 3
    Iron
    Iron
    Iron
    Danielle
    Top achievements
    Rank 1
    Iron
    Iron
    Joel
    Top achievements
    Rank 3
    Bronze
    Bronze
    Iron
    yw
    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?