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

I'm not using Newtosoft.Json anymore so I tried to deserialize the metadata like this:

var chunkData = JsonSerializer.Deserialize<ChunkMetaDataModel>(metaData)!;

It's not getting de-serialized properly as all strings are null and all integers are 0s.

Please update this documentation page: ASP.NET Core Upload Component Chunk Upload | Telerik UI for ASP.NET Core & this demo: Chunk Upload in ASP.NET Core Upload Component Demo | Telerik UI for ASP.NET Core soon as I'm stuck for now.

I originally got help from StackOverflow from my question: c# - System.Text.Json.* & deserialization of streams - Stack Overflow

Mihaela
Telerik team
 answered on 17 Aug 2022
1 answer
623 views

This question is two-fold, and I can't seem to find the answers in the documentation. For background info, I'm using the latest version of Wizard (the Tag version) :

  1. How do I hide the reset button? I don't need it for my form.
  2. How do I go about making the Wizard's 'Done' button a submit type of a button, so I can send the form contents to the server? (I can't seem to find how to go about this).

TIA!

Alexander
Telerik team
 answered on 17 Aug 2022
1 answer
242 views

Hi All,

This example of a responsive form is not working.    The columns never collapse and stack.  They are aways 2  columns.

https://docs.telerik.com/aspnet-core/html-helpers/layout/form/layout?_ga=2.97006175.1914200844.1660175173-1309681442.1657934528#responsive-form

 

I have tried many other things also but nothing seems to work.   

I am using TagHelpers FYI

Update: I also tried the TagHelpers sample and it does not work either.

Is it possible to get a Respond kendo-form that has 2, 3, or 4 columns in desktop but collapse to 1 column on mobile?  

Thanks

 

 

Thanks

Aleksandar
Telerik team
 answered on 17 Aug 2022
1 answer
1.3K+ views

I'm using the Grid component (ASP.NET Core Razor Pages).

 

I would like a column that when clicked will navigate to a specified Page within my application, passing along with it one or more of the column values in my model.

Ideally I'd like to avoid Templates, because it just seems like a lot of string to manage to get an HTML output that I like.

I did come across Commands with a custom Click, but I haven't been able to find documentation yet that shows how I can pass the row details along so I can access specific column values to use in a redirect via JavaScript.

I did get this working with

columns.Template("my anchor tag html goes here with template syntax for #:SomePropValue#")

But it doesn't come across as "clean" as I'd like.

So I'm hoping there's some way to access/pass along a given row's column values in a custom click so I can just use JS for a redirect?

columns.Command(action => {action.Custom("View Application").Click("myJavaScriptFunction")

 

If there's also a way to do this by using only Html Helpers/Razor syntax, I'm also okay with that! But I couldn't find what I'm looking for with just that either, so I started looking into custom clicks and JS.

 

Anton Mironov
Telerik team
 answered on 16 Aug 2022
1 answer
99 views

HI

The SelectListItemBuilder's HtmlAttributes property of DropDownList was gone, WHY ???

namespace Kendo.Mvc.UI.Fluent
{
 public class SelectListItemBuilder : IHideObjectMembers
 {

Everyone needs HtmlAttributes property.


*Kendo.Mvc, Version=2021.3.1207.0。
(telerik.ui.for.aspnet.core\2021.3.1207\lib\net6.0\Kendo.Mvc.dll)

Best regards

Chris

 

 

Mihaela
Telerik team
 answered on 16 Aug 2022
1 answer
1.1K+ views

I have a PanelBar control with 3 panels, each holding a Chart control with column items.  I am using the HtmlHelper build the charts.  The PanelBar is in a container that spans 100% of the screen.  By default, the charts in the panels render at about 25% of the width - and that means charts with a lot of categories are seriously compressed and unreadable.

I've tried using the Width option of ChartArea (inside Chart), and while that works, I can't always be sure the double I set this to will be right for all user's browsers.  There is no string option, so Width has to be a number of pixels.

Using HtmlAttributes (adding style) also has no effect.

How can I get the charts to occupy 100% of the container other than just guessing using ChartArea's Width or resorting to JavaScript to redraw the chart after the page is rendered?

Stoyan
Telerik team
 answered on 15 Aug 2022
1 answer
155 views

hi, I have a simple grid set up for data entry in batch mode. The users don't like having to take their fingers off the keyboard and use the mouse to click a button to either start a new entry or save the changes in the current row. Hitting the Enter key doesn't do anything. Is there a keystroke available that would save the changes in the current row without having to click the Save button?

Similarly, is there a keystroke that would start a new record entry?

If not, any ideas for implementing something like this?

many thanks,

Yvette

 

Momchil
Telerik team
 answered on 15 Aug 2022
1 answer
1.2K+ views

I have the below tabstrip and on a button click I am trying to select/activate the second tab programatically.  Actually, I can't get it to select/activate any tabe programatically. Below my tabstrip definition below I have listed all of the things I have tried but, none of these seem to work.  I am using Visual Studio 2022 and Telerik.UI.for.AspNet.Core 2022.2.510.  What am I doing wrong?

@(Html.Kendo().TabStrip()
            .Name("tabMain")
            .Animation(animation =>
            animation.Open(effect =>
            effect.Fade(FadeDirection.In)))

            .Items(tabstrip =>
            {
            tabstrip.Add().Text("Table Status")
            .HtmlAttributes(new { id="tabMain-tab-1", name="tabMain-tab-1"})
            .Selected(true)
            .Content(@<text>
                    <div>
                    </div>
                </text>);

            tabstrip.Add().Text("Filters")
            .HtmlAttributes(new { id="tabMain-tab-2", name="tabMain-tab-2"})
            .Content(@<text>
                    <div>
                    </div>
                </text>);

            tabstrip.Add().Text("Bill List")
            .HtmlAttributes(new { id="tabMain-tab-3", name="tabMain-tab-3" })
            .Content(@<text>
                    <div>
                    </div>
                </text>);

            tabstrip.Add().Text("Main Data")
            .HtmlAttributes(new { id="tabMain-tab-4", name="tabMain-tab-4" })
            .Content(@<text>
                    <div>
                    </div>
                </text>);

            tabstrip.Add().Text("Details")
            .HtmlAttributes(new { id="tabMain-tab-5", name="tabMain-tab-5" })
            .Content(@<text>
                    <div>
                    </div>
                </text>);

            tabstrip.Add().Text("Reports")
            .HtmlAttributes(new { id="tabMain-tab-6", name="tabMain-tab-6" })
            .Content(@<text>
                    <div>
                    </div>
                </text>);

            tabstrip.Add().Text("Export")
            .HtmlAttributes(new { id="tabMain-tab-7", name="tabMain-tab-7" })
            .Content(@<text>
                    <div>
                    </div>
                </text>);
            })
)

 

 

I have tried all of the following but, none of these seem to work.

$("#tabMain").kendoTabStrip().data("kendoTabStrip").select(2);

$("#tabMain").kendoTabStrip().select(2);

$("#tabMain").kendoTabStrip().data("kendoTabStrip").activateTab(2);

$("#tabMain").kendoTabStrip().activateTab(2);

var tabToActivate = $("#tabMain-tab-2");
$("#tabMain").kendoTabStrip().data("kendoTabStrip").activateTab(tabToActivate);

var tabToActivate = $("#tabMain-tab-2");
$("#tabMain").kendoTabStrip().activateTab(tabToActivate);

var tabStrip = $("#tabMain").kendoTabStrip().data("kendoTabStrip");
tabStrip.select("li:1");  

var tabStrip = $("#tabMain").kendoTabStrip().data("kendoTabStrip");
tabStrip.select(1);   

var tabStrip = $("#tabMain").kendoTabStrip().data("kendoTabStrip");
tabStrip.select((tabStrip.tabGroup.children("li").length - 5));

var tabStrip = $("#tabMain").data("kendoTabStrip");
tabStrip.select((tabStrip.tabGroup.children("li").length - 5));

var tabStrip = $("#tabMain").kendoTabStrip().data("kendoTabStrip");
tabStrip.activateTab((tabStrip.tabGroup.children("li").length - 5));

var tabStrip = $("#tabMain").data("kendoTabStrip");
tabStrip.activateTab((tabStrip.tabGroup.children("li").length - 5));

var tabStrip = $("#tabMain").kendoTabStrip().data("kendoTabStrip");
tabStrip.select(1);

 

Inspecting the tab I want to select I see:

<li class="k-state-default k-item k-tabstrip-item" id="tabMain-tab-2" name="tabMain-tab-2" role="tab" aria-controls="tabMain-2"><span class="k-loading k-complete"></span><span class="k-link" unselectable="on">Filters</span></li>
<span class="k-loading k-complete"></span>
<span class="k-link" unselectable="on">Filters</span>
</li>
Momchil
Telerik team
 answered on 15 Aug 2022
1 answer
101 views

Hello,

I found something but I don't know whether this is a bug.

When I installed the latest version (2022.2.802) I saw some unwanted references in the package like MVC.Core 2.1.0. They belong to ASP.NET Core 2.1.0. Because of that, I can't use some extension methods like UseStaticFiles.

 

 

Viktor Tachev
Telerik team
 answered on 15 Aug 2022
1 answer
311 views

I cannot figure out how to make Title a required field using HtmlHelper.

There does not seem to be an easy way to make Title required.   I want the error message to show up in the UI, I don't want the error message to be a JavaScript alert.

m.Field(f => f.Title);

In the JSON configuration has a validation parameter which makes this very simple.  But I am not using the JSON config.


@(Html.Kendo().Scheduler<SchedulePrototype.ViewModels.CalendarViewModel>()
    .Name("scheduler")
    .Date(startDate)
    .StartTime(new DateTime(startDate.Year, startDate.Month, startDate.Day, 8, 0, 0))
   // .Timezone("Etc/UTC")
    .Selectable(true)
    .Editable(e => e.Template("customEditorTemplate"))
    .Events(e =>
    {
        e.DataBinding("scheduler_dataBinding");
        e.DataBound("scheduler_dataBound");
      //  e.change("scheduler_change");
        e.Save("scheduler_save");
       // e.remove("scheduler_remove");
       // e.cancel("scheduler_cancel");
       e.Edit("scheduler_edit");
      //  e.add("scheduler_add");
       // e.movestart("scheduler_movestart");
        e.Move("scheduler_move");
    @*        e.moveend("scheduler_moveend");
        e.resizestart("scheduler_resizestart");
        e.resize("scheduler_resize");
        e.resizeend("scheduler_resizeend");*@
        e.Navigate("scheduler_navigate");
    })
    .Timezone("Etc/UTC")
     .Resources(resource =>
    {
         resource.Add(m => m.CalendarEventTypeId)
            .Title("Type")
            .Multiple(false)
            .DataTextField("Name")
            .DataValueField("CalendarEventTypeId")
            .DataSource(ds => ds.Read(read => read.Action("GetCalendarEventTypes", "Calendar")).ServerFiltering(false));
        resource.Add(m => m.DealList)
            .Multiple(true)
            .DataTextField("Title")
            .DataValueField("DealId")
            .DataSource(ds => ds.Read(read => read.Action("GetDealsToScheduleForDropDown", "Deal")).ServerFiltering(false));
    })
    .Views(views =>
    {
        views.DayView(dayView => dayView.Selected(true));
        views.WeekView();
        views.MonthView();
        views.AgendaView();
        views.TimelineView();
    })
    .DataSource(d => d
        .Model(m =>
        {
            m.Id(f => f.Id);
            m.Field(f => f.Title);
            m.RecurrenceId(f => f.RecurrenceID);
        })
        .Events(events => events.Error("error_handler"))
        .Read("Events_Read", "Calendar")
        .Create("Events_Create", "Calendar")
        .Destroy("Events_Destroy", "Calendar")
        .Update("Events_Update", "Calendar")
    )
)

Alexander
Telerik team
 answered on 10 Aug 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?