Telerik Forums
UI for ASP.NET Core Forum
1 answer
2.1K+ views
I am currently using a Dialog and Template on Grid change event for a custom edit form. How do I let the popup editor know to use my template for popup edit?
Francis
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 02 Feb 2022
1 answer
390 views

I am using a form in a .net Core project.  I want to disable/enable a maskedtextbox based on ViewBag properties.  It works for regular text boxes, but not a masked text box.  Here is a portion of my code:

i.Add()
.Field(f => f.LastName)
.Label(l => l.Text("Last Name:"))
.Editor(e =>
{
e.TextBox().Enable(ViewBag.canEdit);
});
i.Add()
.Field(f => f.CellPhone)
.Label(l => l.Text("Cell Phone:"))
.Editor(e =>
{
e.MaskedTextBox().Mask("(000) 000-0000").Enable(ViewBag.canEdit);
});

 

Alexander
Telerik team
 answered on 02 Feb 2022
1 answer
715 views

Hey guys,

I know that your intention with the kendo button was always to render a button of type "button". Also I know you're providing a kendo form widget to render a full form with a submit button.

But isn't there any solution to achive a basic html form and then render a kendo button of type "submit"? I know I can change it with jquery manually afterwords or by registrating an function which will fire the submit again, but i would only use this when there isn't any built in solution to force it as type submit.

My intention was to render the kendo button with the tag helper and then manually set the type but it will be always overridden back to type "button" instead of keeping it as "submit".

<kendo-button name="btnSubmit" theme-color="ThemeColor.Primary" class="float-right" type="submit">
                Speichern
                @(Html.Kendo().Loader()
                    .Name("loader")
                    .HtmlAttributes(new { aria_busy = "false", aria_description = InfoMessages.LoadingOperation, aria_live = "polite" })
                    .Size(LoaderSize.Small)
                    .ThemeColor(LoaderThemeColor.Light)
                    .Type(LoaderType.InfiniteSpinner)
                    .Visible(false)
                )
            </kendo-button>

Stoyan
Telerik team
 updated answer on 02 Feb 2022
1 answer
2.4K+ views

Good afternoon,

Is there an easy way to use the built-in Grid popup edit window to only edit a few model fields rather than all of them?

I want an edit popup with three fields, update and cancel, and to prepopulate with the values from the grid row.

Can this be achieved, or will I need to build a custom popup window?

Kind regards,

Richard

Alexander
Telerik team
 answered on 01 Feb 2022
1 answer
433 views

Hey guys,

I have a problem with my HtmlHelper. My ButtonBuilder does not contain a definition for ThemeColor (like described on your demo page here). Funny is that my KendoLoader does have that. Any suggestions (see my picture)?

I had that error with the Kendo Release R3 2021 and currently I've updated to the current last version (2022.1.119) through Progress Control Panel and still it is.

FYI: @using Kendo.Mvc.UI is in my _ViewImports included. There is no change when I implement that code line into my current view.

@(Html.Kendo().Loader()
                    .Name("loaderDropDown")
                    .Size(LoaderSize.Medium)
                    .ThemeColor(LoaderThemeColor.Dark)
                    .Type(LoaderType.InfiniteSpinner)
                    .Visible(false)
                )
                @(Html.Kendo().Button()
                    .Name("btnEditPrivacy")
                    .Icon("edit")
                    .HtmlAttributes(new { style = "min-width: 27px;", title = "Datenschutzerklärung bearbeiten" })
                    .ThemeColor(ThemeColor.Primary)
                )

 

Edit:
Alright guys, it was my fault. I forgot to update my telerik nuget package. Now it's working! Thanks anyways!

Daniel
Top achievements
Rank 3
Iron
Iron
Iron
 answered on 01 Feb 2022
1 answer
147 views

I am struggling to understand how to handle create operations when ListView contents must be associated with a parent object.  To demonstrate by using examples from your docs, let's say the orders are part of a store object:

public class StoreViewModel
{
    public int StoreID {get; set;}
    IEnumerable<OrderViewModel> StoreOrders {get; set;}
    // various other fields
}

My goal is to have a View, Model type is the StoreViewModel, and a ListView showing the Orders from a specific store.  The Create function of the ListView would need to know the store ID and have it passed somehow.  I think I need something like this:

@model StoreViewModel

@(Html.Kendo().ListView<OrderViewModel>()
    .DataSource(ds => ds
        .Ajax()
        .Model(m => m.("OrderID")
        .Read(read => read
            .Action("Orders_Read", "ListView")
            .Data(@<text>@Html.Raw(Json.Serialize(Model))</text>)    
        )
        .Create(create => create
            .Action("Orders_Create", "ListView")
            .Data(@<text>@Html.Raw(Json.Serialize(Model))</text>)    
        )
    )
)

 

The controller has this method for read, which works perfectly:

public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request, StoreViewModel store)
{
    // code that returns orders from one store
}

However, when I try to create, the same .Data parameter doesn't seem to be passed:

public ActionResult Orders_Create([DataSourceRequest]DataSourceRequest request, StoreViewModel store)
{
    // misc code to make a new order and add to DB goes here
    newOrder.StoreID = store.StoreID;  // this fails
}

When looking through this with the debugger, "store" is populated in the Orders_Read method, but is null in the Orders_Create method, even though I'm trying to use them the same way.  While that's concerning, I suspect there's an overall better way to do this period.  Are there any examples that show similar scenarios with related models/objects?

 

Stoyan
Telerik team
 updated answer on 31 Jan 2022
1 answer
102 views

Good afternoon,

I have updated to the latest version of Telerik ASP.NET Core (2022.1.119).

The scrollbars are missing from the 'View HTML' window. Even the online demo is the same.

All tools in ASP.NET Core Editor Component Demo | Telerik UI for ASP.NET Core

Previously it looked like this:

Is there a fix for this?

Kind regards,

Richard

Stoyan
Telerik team
 answered on 31 Jan 2022
0 answers
255 views
We recently upgraded our Angular application from .NET Core 3.1 to .NET 6.  We are now trying to upgrade Kendo to the latest supported version.  When I try to update the Nuget package Telerik.UI.for.AspNet.Core the 2021.3.1207 package is showing as the latest supported version.  I followed the instructions on updating the package.json file, but now all of our controls are having styling issues.  I see there was a more recent release but it's not showing up as an option in the Nuget Package Manager, is there some way I can refresh that?
Nate
Top achievements
Rank 1
Iron
 updated question on 28 Jan 2022
1 answer
436 views

Good afternoon,

I am using the latest version of Telerik ASP.NET Core (2022.1.119).

I am using the classic opal theme on my site. I have a responsive menu which collapses to the hamburger.

If I reference the common css file first the menus don't wrap correctly when the page width is reduced.

    <link rel="stylesheet" href="~/lib/kendo/css/kendo.common.min.css" />
    <link rel="stylesheet" href="~/lib/kendo/css/kendo.classic-opal.min.css" />

This configuration gives this:

Switching the configuration so that common css is after the classic opal theme makes it work:

However, having the common css second breaks the tabstrips - the outer borders of the tab no longer display, only the header tabs:

If I'm using kendo.classic-opal.min.css do I also need to use kendo.common.min.css, and if I do, why does this break the tabstrip? Apart from site.css, is there another css I need to reference?

Kind regards,

Richard

Mihaela
Telerik team
 answered on 28 Jan 2022
1 answer
87 views
I need to display a hierarchy in a treelist but like a grid using local data. Is this supported?
Stoyan
Telerik team
 answered on 28 Jan 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?