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

Hello I have existing data grid in an ASP.NET Core project. I want to attach the new Kendo Filter to that grid without specifying the data source name explicitly.

Is there any way to do this?

Nikolay
Top achievements
Rank 1
Iron
 answered on 26 Nov 2019
5 answers
191 views

How can I get all the visible events in the current view?

I can't use the date range to do this since I'm using a filter to filter the events by resource. For instance, if I have events A, B, C using resource 1, E, F using resource 2, after I filter the scheduler by resource 2, only events E and F will be visible. How can I get those 2 visible events in the client side?

Aleksandar
Telerik team
 answered on 25 Nov 2019
5 answers
104 views

<div class="demo-section k-content wide">
    @(Html.Kendo().Chart<Telerik.Models.Testing>()
        .Name("chart2")
        .Title("Testing")
        .Legend(legend => legend
            .Position(ChartLegendPosition.Top)
        )

        .DataSource(ds => ds.Read(read => read.Action("MyData", "Binding")))
        .Series(series =>
        {
            series.Column(m => m.Severity.Contains("TestingThis"), categoryExpression: m => m.Iteration)
            .Name("Severity Levels")
            .Aggregate(ChartSeriesAggregate.Count)
            .Labels(l => l.Visible(true));

            

        })
           
    )
</div>

 

I get an InvalidOperationException: Bound columns require a field or property access expression.

The problem lies here: series.Column(m => m.Severity.Contains("TestingThis"), categoryExpression: m => m.Iteration)

Is there any way for me to filter that Severity column from my data model?

Tsvetomir
Telerik team
 answered on 25 Nov 2019
8 answers
1.5K+ views

Im trying to load the datasource of a grid via jQuery, with json that has been fetched via an ajax call. I can see data in the object at runtime in the dev console, but the grid never displays the new data.  What can I check

 

// where Lines is an array of objects of type that match the model being referenced in the grid
var lineGridDS = $("#linesGrid").data("kendoGrid").dataSource;
itemGridDS.data(Lines);

Petar
Telerik team
 answered on 22 Nov 2019
1 answer
749 views

Hi All,

Want to know if this is possible and if it is how can it be achieved.

I am a .net core application with a layout using an html 5 admin templates. How can I integrate telerik .net core components in this project.

Thank you.

Aleksandar
Telerik team
 answered on 21 Nov 2019
1 answer
216 views

Hi

I have this code in ASP.NET to bind a data grid to a data source returned from EF:

 

Code:

--------

        @(Html.Kendo().Grid<GarageBookingApp.Models.AdminViewModel>().Name("grid")
                        .Groupable()
                        .Sortable()
                        .Editable()
                        .Scrollable()
                        .ToolBar(x => x.Create())
                        .Columns(columns =>
                        {
                            columns.Bound(column => column.businessTimes.opening);
                            columns.Bound(column => column.businessTimes.closing);
                        
                            columns.Command(column =>
                            {
                                column.Edit();
                                column.Destroy();
                            }).Width(230);
                        })
                        .DataSource(ds => ds.Ajax()
                                .Read(r => r.Action("GetBusinessTimes", "Home"))
                            .PageSize(10)
                        )
                        .Pageable()
        )

 

The controller method is like this:

            using (GarageContext gtx = new GarageContext())
            {
                return gtx.BusinessTimes.Select(businessTimes => new BusinessTimesEntity
                {
                    closing = businessTimes.closing,
                    opening = businessTimes.opening

                }).ToList();

 

I also notice that in the model, the properties are only "getted" but not set".

 

What am I missing to retrieve the database fields correctly here?

Nikolay
Telerik team
 answered on 20 Nov 2019
2 answers
996 views

I cannot appear to install .net core mvc asp.net for the .net core 3.1 run-time is there a known issue with this yet.

All The logs I have are  the  .net version is 

Visaual Studio 16.4.0 preview 5.0

And they are a dotnetcore 3.1 project web mvc

 

Restoring packages for D:\GitMaster\Freelancer\SalesOrders\RoundTableErpAuth\RoundTableErp.Web\RoundTableErp.Web.csproj...
NU1608: Detected package version outside of dependency constraint: Microsoft.CodeAnalysis 3.3.1 requires Microsoft.CodeAnalysis.CSharp.Workspaces (= 3.3.1) but version Microsoft.CodeAnalysis.CSharp.Workspaces 3.4.0-beta4-final was resolved.
NU1701: Package 'DapperExtensions 1.6.3' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v3.1'. This package may not be fully compatible with your project.
NU1107: Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 3.4.0-beta4-final directly to project RoundTableErp.Web to resolve this issue. 
 RoundTableErp.Web -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.4.0-beta4-final -> Microsoft.CodeAnalysis.Common (= 3.4.0-beta4-final) 
 RoundTableErp.Web -> Telerik.UI.for.AspNet.Core 2019.3.1023 -> Microsoft.CodeAnalysis 3.3.1 -> Microsoft.CodeAnalysis.VisualBasic.Workspaces 3.3.1 -> Microsoft.CodeAnalysis.Common (= 3.3.1).
Package restore failed. Rolling back package changes for 'RoundTableErp.Web'.
Time Elapsed: 00:00:00.9141745
========== Finished ==========

 

Petar
Telerik team
 answered on 20 Nov 2019
3 answers
364 views

I think it involves the classes .k-link k-menu-link but also hover text.  Im wanting to change both.

Anyone got any snippets for this?

 

BitShift
Top achievements
Rank 1
Veteran
 answered on 20 Nov 2019
3 answers
492 views

HI

Why the Grid read action (include javascript grid.dataSource.read() function use "api" url ???

ERROR : POST http://localhost:31466/api/AppM010/GetSomeList 415 (Unsupported Media Type)

View

.Read(read => read.Action("GetSomeList", "AppM010").Data("..."))

Javascript

grid.dataSource.read() 

There have Controller/ApiController with the same class/method name and different namespace in application : 

  namespace App1.ApiControllers
  {
    [ApiController]
    [ProducesAttribute("application/json"]
    [Route("api/{controller}/{action}")]
    public class AppM010Controller : BaseController
    {
        public AppM010Controller()
        {
        }

        [HttpPost]
        public IList<TSomeView> GetSomeList(...)
        {

  namespace App1.Controllers
  {
    public class AppM010Controller : Controller
    {
        public AppM010Controller()
        {
        }

        public ActionResult GetSomeList([DataSourceRequest]DataSourceRequest request, ...)
        {


*Don't ask me change the Controller/ApiController or method name.

Nobody knows there have the [ApiController] attribute for ApiController ?? 
I don't want any component action use the ApiController.

I think the component action got the wrong controller via action name only.
Not only the Grid, othere component is the same.

Fix this BUG as soon as possible, please.

Best regards

Chris

 

 


Boyan Dimitrov
Telerik team
 answered on 19 Nov 2019
7 answers
122 views

I'm attempting to add multiple partial views based on the click of a button. I have various controls including a date/time picker.  This works with the initial page loaded instance (index 0) however once I try to add the 2nd (index 1) from an AJAX call, the controls render but not with the Kendo UI front.  Attached file is a screen shot of the result when a new instance of the partial view is added.  What am I doing wrong that they will not render with the Kendo front?

Partial View:

<div class="col-12 col-md-3 col-lg-3 col-xl-3 order-1">
    <kendo-datetimepicker id="MyCollection[@Model.CollectionIndex].StartDateTime" format="{0:g}" class="w-100" />
</div>

 

Controller:

public PartialViewResult SplitTime(int newIndex)
        {
            return PartialView("_TimeRow", new MyModel() { CollectionIndex = newIndex });
        }
Viktor Tachev
Telerik team
 answered on 19 Nov 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?