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

I am relatively new to ASP.Net core (.net6) and I am trying to bind the Kendo scheduler with my existing data source.

Background: I am tasked with replacing outdated javascript tools for our "shipping scheduler", which is very similar to the Telerik Scheduler Timeline view.

Here is an example of what I am trying to achieve...

 

The data source is a simple API source from the web (for example https://mydomain.com/datasource), with the following structure:

 

namespace ShippingSchedulerApp.Models
{
    public class SchedulerEvent
    {
        public long ID { get; set; }
        public DateTime? start_date { get; set; }
        public DateTime? end_date { get; set; }
        public string? text { get; set; }
        public string? shipclass { get; set; }
        public decimal? beam { get; set; }
        public string? sectionID { get; set; }
        public string? flag { get; set; }
        public string? country { get; set; }
        public string? visitnumber { get; set; }
        public int? visitid { get; set; }
        public int? imo { get; set; }
        public string? details { get; set; }
        public string? cargo { get; set; }
        public decimal? duration { get; set; }
        public decimal? loa { get; set; }
        public string? stevedore { get; set; }
    }
}

If someone could point me to a demo or a sample way of connecting the above to the Telerik Scheduler Timeline view, that would be great.

Thanks

 

Stoyan
Telerik team
 answered on 15 Jun 2023
5 answers
337 views

I find myself having a heck of a time getting started with the scheduler. Is there a SIMPLE getting started example that explains how to use the scheduler? All I am looking to do is to have a monthly view and be able to display availability of items. An item could be, for example, a room at a hotel. I won't be doing anything more granular than day level scheduling. I want to block out a date on the calendar for an item. That's it. Once I can figure out how to do that, I can dig deeper myself.

Any guidance would be greatly appreciated.

Stoyan
Telerik team
 answered on 15 Jun 2023
0 answers
121 views

Hello,

I have a DropDownList that I would like to cache based on a radio button 

Code DropDownList :
@(
                    Html.Kendo().DropDownList()
                        .Name("orders")
                        .DataTextField("Companies_name")
                        .DataValueField("CompaniesId")
                        .MinLength(3)
                    .HtmlAttributes(new { style = "width:25%" })
                        .Template("#= CompaniesId # |  #= Companies_name #")
                        .Height(520)
                        .Filter(FilterType.Contains)
                        .DataSource(source =>
                        {
                            source
                            .Ajax()
                            .PageSize(80)
                            .Read("Virtualization_Read", "NewUploadAccount");
                        })
                        .Events(e =>
                        {
                            e.Change("onChange");
                    })
                        .Virtual(v => v.ItemHeight(26).ValueMapper("valueMapper"))
                        )
Regards
Nicolas
Top achievements
Rank 1
Iron
 asked on 12 Jun 2023
1 answer
327 views
I'm migrating net .framework 4.7 using kendo mvc 2017.2 to net core 6, is it possible to use this version with net core 6?
Stoyan
Telerik team
 answered on 12 Jun 2023
1 answer
758 views

I'm using ASP NET CORE.  I have a grid and I enable filtering on a column with .Filterable().  Is there a way to sort the items that appear in the checkbox filter?

EX:

My filter would look like this

  • A
  • B
  • C

And not

  • B
  • C
  • A

When the drop down is displayed.

Alexander
Telerik team
 answered on 09 Jun 2023
1 answer
154 views

Hi There, 

I'm working on a web app and need to access the Excel column with letters instead of an index. I have gone through the documentation but didn't find how we can access the Excel column with alphabets such as A20

Could you please let me know if you have any functions or not?

 

Thanks,

 

Stoyan
Telerik team
 answered on 07 Jun 2023
1 answer
151 views

I have a nested grid in a client template. Everything on my pages works great. I would like to refresh the parent grid when the nested gid is updated. The only way I have found to do this is to use the RequestEnd event on the nested grid, so I defined it in the gird's data source:

    <script id="campaignTemplate" type="text/kendo-tmpl">
        @(Html.Kendo().Grid<Campaign>()
                                .Name("grid_#=Id#")
                            .Columns(columns =>
                            {
                                columns.Bound(p => p.Name).Width(200);
                                columns.Bound(p => p.MailDate1).Width(150).Title("Mail Date");
                                columns.Bound(p => p.ProjectedQuantityMailed).Width(100).Title("Quantity");
                                columns.Bound(p => p.ProjectedPercentReturn).Width(50).Title("Percent Return");
                                columns.Bound(p => p.ProjectedNumberOfGifts).Width(50).Title("Gifts");
                                columns.Bound(p => p.ProjectedAverageGiftAmount).Width(50).Title("Average Gift");
                                columns.Bound(p => p.ProjectedGrossIncome).Width(100).Title("Gross Income");
                                columns.Bound(p => p.ProjectedGrossIncomePerThousand).Width(50).Title("Gross Income/M");
                                columns.Bound(p => p.ProjectedTotalCost).Width(100).Title("Cost");
                                columns.Bound(p => p.ProjectedTotalCostPerThousand).Width(100).Title("Cost/M");
                                columns.Bound(p => p.ProjectedNetIncome).Width(100).Title("Net");
                                columns.Bound(p => p.ProjectedNetIncomePerThousand).Width(100).Title("Net/M");
                                columns.Bound(p => p.ProjectedNetIncomePerDonor).Width(100).Title("Net/Donor");
                                columns.Bound(p => p.ProjectedCostPerDollarRaised).Width(100).Title("Per Dollar Raised").Hidden(true);
                                columns.Bound(p => p.ProjectedMonthsToRecoupCost).Width(100).Title("Recoup Months").Hidden(true);
                                columns.Bound(p => p.ProjectedMailshopCost).Width(100).Title("Mail Shop").Hidden(true);
                                columns.Bound(p => p.ProjectedPostageCost).Width(100).Title("Postage").Hidden(true);
                                columns.Bound(p => p.ProjectedCopyCost).Width(100).Title("Copy").Hidden(true);
                                columns.Bound(p => p.ProjectedProofreaderCost).Width(100).Title("Proof Reader").Hidden(true);
                                columns.Bound(p => p.ProjectedArtCost).Width(100).Title("Art").Hidden(true);
                                columns.Bound(p => p.ProjectedListCost).Width(100).Title("List").Hidden(true);
                                columns.Bound(p => p.ProjectedProductionManagementFee).Width(100).Title("Management").Hidden(true);
                                columns.Bound(p => p.ProjectedMergePurgeCost).Width(100).Title("Merge Purge").Hidden(true);
                                columns.Bound(p => p.ProjectedPrintingCost).Width(100).Title("Printing").Hidden(true);
                                columns.Bound(p => p.ProjectedQctCost).Width(100).Title("QCT").Hidden(true);
                            })
                            .ToolBar(toolbar =>
                            {
                                toolbar.Custom().Text("CAMPAIGNS").HtmlAttributes(new { id = "btnCampaignLabel" });
                                toolbar.Create();
                                toolbar.Save();
                            })
                            .Editable(editable => editable.Mode(GridEditMode.InCell))
                            .Navigatable()
                            //.ClientDetailTemplateId("panelTemplate")
                            .ColumnMenu(menu =>
                            {
                                menu.ComponentType("modern");
                                menu.Columns(columns =>
                                {
                                    columns
                                .Sort("asc")
                                .Groups(groups =>
                                {
                                    groups.Add().Title("Summary Costs").Columns(new List<string> { "ProjectedTotalCost" }); ;
                                    groups.Add().Title("Detailed Costs")
                                .Columns(new List<string> { "ProjectedMailshopCost", "ProjectedPostageCost","ProjectedCopyCost","ProjectedProofreaderCost"
                                    ,"ProjectedArtCost","ProjectedListCost","ProjectedProductionManagementFee","ProjectedMergePurgeCost","ProjectedPrintingCost"
                                    ,"ProjectedQctCost"});
                                });
                                });
                            })
                            .DataSource(dataSource => dataSource
                                .Ajax()
                                .PageSize(20)
                                .Model(model =>
                                    {
                                        model.Id(p => p.Id);
                                        model.Field(p => p.Id).Editable(false);
                                        model.Field(p => p.FiscalYearId).Editable(false);
                                        model.Field(p => p.ProjectedNumberOfGifts).Editable(false);
                                        model.Field(p => p.ProjectedGrossIncomePerThousand).Editable(false);
                                        model.Field(p => p.ProjectedNetIncomePerThousand).Editable(false);
                                        model.Field(p => p.ProjectedNetIncome).Editable(false);
                                        model.Field(p => p.ProjectedGrossIncome).Editable(false);
                                        model.Field(p => p.ProjectedTotalCostPerThousand).Editable(false);
                                        model.Field(p => p.ProjectedCostPerDollarRaised).Editable(false);
                                        model.Field(p => p.ProjectedNetIncomePerDonor).Editable(false);
                                    })
                                .Read(read => read.Action("ByProgram", "Campaign", new { programId = "#=Id#" }))
                                .Create(update => update.Action("CreateFromNestedGrid", "Campaign", new { programId = "#=Id#" }))
                                .Update(update => update.Action("Update", "Campaign"))
                                .Destroy(update => update.Action("Delete", "Campaign"))
                                .Events(events => events.RequestEnd("onCampaignRequestEnd"))
                            )
                            .Pageable()
                            .Sortable()
                            .ToClientTemplate()
                    )
                    

    </script>

I have a function defined to handle the event:

    <script type="text/javascript">
         function onCampaignRequestEnd(e) {
            console.log('Campaign grid on request end");
                            var programGrid = $("#programGrid").data("kendoGrid");
            programGrid.dataSource.read();
        }
    </script>

 

No matter where I put this script on the page, I receive this error when expanding the parent grid. I even tried adding it the parent grid and received the same error. I have similar scripts defined in outer pages and have never see this happen:

 

3383:1 Uncaught ReferenceError: onCampaignRequestEnd is not defined
    at eval (eval at <anonymous> (jquery.min.js:2:2668), <anonymous>:1:14151)
    at Object.syncReady (kendo.aspnetmvc.js:983:21)
    at eval (eval at <anonymous> (jquery.min.js:2:2668), <anonymous>:1:7)
    at eval (<anonymous>)
    at jquery.min.js:2:2668
    at Function.globalEval (jquery.min.js:2:2679)
    at Ha (jquery.min.js:3:21263)
    at n.fn.init.after (jquery.min.js:3:23226)
    at n.fn.<computed> [as insertAfter] (jquery.min.js:3:24511)
    at init._toggleDetails (kendo.all.js:312399:21)

 

Aleksandar
Telerik team
 answered on 07 Jun 2023
1 answer
185 views

Hi,

I upgraded Telerik version in our project (Telerik.UI.for.AspNet.Core nuget) from version 2021.2.616 to version 2023.1.425 and since then is for TabStrip component not working LoadContentFrom.

I have in my controller method like this:

public IActionResult GetProductListPartial()
{
     return PartialView("_ProductList");
}

And in my View I have code like this:

 @(Html.Kendo().TabStrip()
                .Name("tabstrip")
                .Items(tabstrip =>
                {
                    tabstrip.Add()
                            .Text(@Localizer["Menu.ProductList"])
                            .Selected(true)
                            .LoadContentFrom("GetProductListPartial", "ProductList")
                            .ContentHtmlAttributes(new { @class = "product-list-tab" });
                }))

When I reworked implementation in the View, then it started to work again:

 @(Html.Kendo().TabStrip()
              .Name("tabstrip")
              .Items(tabstrip =>
              {
                  tabstrip.Add().Text(@Localizer["Menu.ProductList"])
                      .Selected(true)
                       //.LoadContentFrom("GetProductListPartial", "ProductList")
                      .Content(@<text>@await Html.PartialAsync("_ProductList")</text>)
                      .ContentHtmlAttributes(new { @class = "product-list-tab" });
              }))
My point is, I didn't find anywhere, that LoadContentFrom is not supported anymore and also in application it's still buildable and looks like it should work. What is the required change for working it again please?
Alexander
Telerik team
 answered on 31 May 2023
1 answer
169 views
I have Visual Studio 2022 installed and want to use datepicker. Where is the datepicker.dll locate so I can reference it?
Alexander
Telerik team
 answered on 30 May 2023
1 answer
594 views

I'm wondering if there is any support for styling a Dialog in the .net core version of telerik that I am trialling right now?  The documentation lists the ability to add a cssclass but that is only for the button, not for the entire dialog itself, I need to replicate previous functionality we were using where a cssclass is applied to the object in javascript when the dialog has been open for a certain amount of time.

This was the only documentation I could find and it's only able to add a class to the button, not the entire dialog.

Configuration, methods and events of Kendo UI Dialog - Kendo UI for jQuery (telerik.com)

Alexander
Telerik team
 answered on 29 May 2023
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?