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

Hi,

I've used the ASP.NET AJAX components for many years and am just starting to look at the UI for ASP.NET Core equivalents.

We have a large dataset (potentially hundreds of thousands of records) of historical data that we want to show in a paginated grid.The data retrieval is optimised for performance so we can retrieve any given page of data quickly, and aren't transferring large of amounts of data around unnecessarily.

In the ASP.NET AJAX grid we'd set the VirtualItemCount property which enabled the grid to initialise the pager correctly and show the total number of items and pages, and then respond to requests to retrieve the appropriate page of data in the NeedDataSource() event as the user navigated through the pages.

I can't see anything that would provide equivalent behaviour in the UI for ASP.NET Core grid though?

Thanks in advance,

Gary

Viktor Tachev
Telerik team
 answered on 27 Jun 2019
1 answer
429 views

Hi,

We have a grid where we set some datasource model defaultvalues. These then apply to hiddenfor fields on a popup editor template.

This works up to version 2018.3.1017 but does not work in 2019.2.619 and earlier.

Is there a different approach we can take which will work? Or is it a bug?

Grid

    .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("_AuthMembership"))

 

Grid DataSource

.DataSource(dataSource => dataSource
                        ...
                        .Model(model =>
                        {
                            model.Id(p => p.Id);
                            model.Field(p => p.cUsername).DefaultValue(ViewBag.Email);
                            model.Field(p => p.Id).Editable(false);
                        })

 

Editor Template contains

@Html.HiddenFor(model => model.cUsername)  ... but it is always null now with 2019.2.619.

Passing values around in ViewBag shows each page knows about value and it worked in 2018.3.1017.

We want to upgrade for newer controls - what can we do please?

Thanks,

Daniel.

Tsvetomir
Telerik team
 answered on 26 Jun 2019
4 answers
1.9K+ views

     I am reviewing the .net core package for web app development and I am interested in the PDF viewer. I create PDF documents programmatically (C# / iText on the server) and was wondering if I could use a MemoryStream as a datasource for the PDF viewer without having to write the document to file first. Rendering from RAM would be much the preferred option.

Kind regards,

 

Paul S

Paul Shearing
Top achievements
Rank 1
 answered on 26 Jun 2019
1 answer
243 views

I am experiencing an issue similar to the following thread:

https://www.telerik.com/forums/unresponsiveness-in-visual-studio

SSIS projects are unresponsive in Visual Studio 2019.  Saves take several minutes, and Memory/CPU spikes during the process.  The Telerik extensions must stay disabled when working with SSIS projects/packages.

 

Application: Visual Studio 2019 - Enterprise

Telerik Extension Information:

Telerik.CommonPackage - installed 5/13/19, version 1.2.0

    Using the latest versions of all Telerik Extensions (asp.NET, Core, MVC)

 

System Information: Windows Server 2016 Standard (64bit OS)

 

About "Microsoft Visual Studio 2019"

Microsoft Visual Studio Enterprise 2019 - Version 16.1.3

Microsoft .NET Framework - Version 4.7.03062

 

Please let me know if I can provide any additional information for you.

Vesko
Telerik team
 answered on 25 Jun 2019
1 answer
99 views

Hi,

i'm evaluating UI for ASP.NET Core for use in a new project. One of the requirements is WCAG 2.1 AA conformance, but I couldn't find a definite statement if it is supported or not. I found some statements about Kendo UI (https://www.telerik.com/kendo-vue-ui/components/accessibility/) and ASP.NET AJAX (https://www.telerik.com/aspnet-ajax/tech-sheets/accessibility-support) but nothing about ASP.NET Core. Also, when I hit the "Accessibility Support" link on https://www.telerik.com/support/aspnet-core I get redirected to a page that describes Kendo UI. Does this mean the Kendo UI statement holds true for ASP.NET Core too or is the link simply wrong?

Regards,

Matthias

Milena
Telerik team
 answered on 25 Jun 2019
3 answers
753 views

Hello, I am trying to access client template values in Razor syntax like the below. pay.ID always return "#= data.ID #" instead of value. But @id inside html return the correct value.

<script id="GridCommandTemplate" type="text/x-kendo-template">

    @{
        var id = "#= data.ID #"
        var s = "#= data.StatusStr #";
        var userid = "#= data.UserId #";
        var data = ("#= data #");

        object pay = new Payment() { ID = id, UserId = userid };
    }

    <a class="dropdown-toggle k-button k-primary" data-toggle="dropdown">
        <i class="k-icon k-i-more-horizontal">@id</i>
    </a>

<ul class="dropdown-menu dropdown-user">
        <li>
            <a href="Payment/Details?id=#= data.id#" class="dropdown-item"><i class="k-icon k-i-eye"></i> Details</a>
        </li>

        @if ((await AuthorizationService.AuthorizeAsync(
       User, pay,
       PaymentOperations.Update)).Succeeded)
        {
            <li class="dropdown-divider"></li>
            <li>
                <a href="Payment/Edit?id=#= data.id#" class="dropdown-item"><i class="k-icon k-i-edit"></i> Edit</a>
            </li>
        }
     
    </ul>
</script>

Eyup
Telerik team
 answered on 25 Jun 2019
4 answers
1.6K+ views

I'm trying to add Group Headers to my grid, but can't get anything to display. Aggregate footers are fine, but headers just don't seem to work. Example grid...

@(Html.Kendo().Grid<PersonTimesheetSummary>()
                    .Name("grid")
                    .Columns(columns => {
                        columns.Bound(p => p.PersonCode);
                        columns.Bound(p => p.FullName);
                        columns.Bound(p => p.NoOfTimesheetDays).ClientGroupHeaderTemplate("#=sum#");
                    })
                    .DataSource(dataSource => dataSource
                        .Ajax()
                        .Aggregates(aggregates =>
                        {
                            aggregates.Add(p => p.NoOfTimesheetDays).Sum();
                        })
                        .Group(groups => { groups.Add(p => p.Company); groups.Add(p => p.Department); })
                        .Read(read => read.Action("GetPersonTimesheetSummary", "Person").Data("getGridParams")))
                )

I've tried this using the Html and tag helper formats with no success. I'm using version 2019.2.514.

Steve
Top achievements
Rank 1
 answered on 25 Jun 2019
2 answers
584 views

I have added a date time picker to a kendo grid custom pop-up template. It shows up with out the Calendar and time selector icons. Attached is an image to describe this better.

 

This is where I am adding the date time to the template

1.<div class="form-group">
2.       <label asp-for="ScheduledSendDate" class="col-md-2 control-label"></label>
3.       <div class="col-md-10">
4.           <input id="date-input" asp-for="ScheduledSendDate" class="form-control" />
5.           <span asp-validation-for="ScheduledSendDate" class="text-danger"></span>
6.       </div>
7.   </div>

 

In the shared editor template folder I have defined the following template for datetimes

1.@model DateTime?
2. 
3.@(Html.Kendo().DateTimePickerFor(m => m)
4.    .Min(DateTime.Now)
5.    )

 

I show no errors in chrome developer tools and I have imported all of the kendo css and js into _Layout.cshtml

 

Any help would be fantastic.

 

Josh
Top achievements
Rank 1
 answered on 20 Jun 2019
1 answer
190 views

Hello,

is it possible to configure a grid with SignalR binding and binding to remote data as fallback?

For example: The grid uses SignalR to show changes using SignalR immediately. If there is a SignalR failure the grid refreshes all 10s by itself, by requesting data from the controller.

I had in mind, that i call the read method with a timer. But i have no idea how to configure the read method to do both, SignalR and reading from the controller.

Or do i have to create a second view with a Grid binding to remote data and switch the views if SignalR is not available?

 

Thanks

Michael

 

 

Alex Hajigeorgieva
Telerik team
 answered on 20 Jun 2019
1 answer
155 views

Hi,

I'm so close I can taste it.

I have a razor page (we'll call Main) and it pops a windows from a button called AddItem.

That window, (AddItem) will pop another window from a button on it called AddFeature.

I can get the windows popping up just fine. However when I try to submit the form on the AddFeature window. I can't figure out how to close it afterward.

Bottom line is that when I click to save the new feature, the window does not close. The post happens and things get saved to the db, but it appears that my code to close the window does not get called. The code below is heavily redacted so there may be some typos but it should get the idea across.

The question remains, what's the right way to do this?

Any help would be great.

Code below:

 

<body>
    <div class="container-fluid body-content">
 
        @(Html.Kendo().Window()
             .Name("AddItem")
          //   .Width(100)
         //    .Height(100)
             .Resizable()
             .Modal(true)
             .Scrollable(true)
             .Title("Add New User")
             .Visible(false)
             .Actions(actions => actions.Refresh().Minimize().Maximize().Close())
             .Content("loading ...")
             .LoadContentFrom(Url.Content("~/Admin/AddItem"))
        .Animation(true)
        .Draggable(true)
        )
        <form method="post" id="frmMain" asp-page-handler="Main" asp-page="Main">
.
.
.
javascript function to pop window in response to button click
 function OnNewItem()
        {
            var win = $("#AddNewItem").data("kendoWindow");
            win.center().open();
        }
 
 
// now  on the item page we have a button that pops the following window
 
<body>
    <div class="container-fluid body-content">
 
        @(Html.Kendo().Window()
             .Name("AddNewFeature")
             .Resizable()
             .Modal(true)
             .Scrollable(true)
             .Visible(false)
             .Actions(actions => actions.Refresh().Minimize().Maximize().Close())
             .Content("loading ...")
             .LoadContentFrom(Url.Content("~/Admin/AddFeature"))
        .Animation(true)
        .Draggable(true)
        )
        <form method="post" id="frmItem" asp-page-handler="Item" asp-page="Item">

.

.

.

// now on the feature page:

 <body>
    <form asp-route-returnUrl="@Model.ReturnUrl" asp-page-handler="NewFeature" asp-page="NewFeature" method="post" id="theNewFeatureForm">

…

 

<input type="submit"  id="update-button" onclick="DoSave();" class="btn btn-primary" value="Save" />
 
 
…
 
        function DoSave()
        {
              $('#theNewFeatureForm').submit(function (e)
               {
                e.preventDefault();
                
 
                $.ajax({
                        url: '/Admin/AddNewFeature',
                        type: 'POST',
                        dataType: 'json',
                        data: $(this).serialize(),
                    success: function (data)
                    {
                                    var win = $("#AddNewFeature").data("kendoWindow");
                                    win.close();
                    }
                    });
 
                 
 
            });

 

 

 
Ivan Danchev
Telerik team
 answered on 19 Jun 2019
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?