Telerik Forums
UI for ASP.NET Core Forum
1 answer
576 views
Hello, I have a two-dimensional string array that I want to bind to kendo mvc grid. It contains two rows. It's able to display the first row as Header, but it's no not showing the second row. Following is my code for the view which receives the said two-dim string array:

@using Kendo.Mvc.UI

@model string[][]


@if (Model != null)
{
    
    var grid = Html.Kendo().Grid<dynamic>(Model)
        .Name("importGridHeader")
        .Columns(columns =>
        {
            var row = Model[0];
            foreach (var col in row)
            {
                columns.Bound(col).Width(200);
            }
        }
        )
        .HtmlAttributes(new { style = "min-height: 450px; max-height:1250px;" })
        .Sortable()
        .Scrollable(s => s.Enabled(true))
        .Resizable(r => r.Columns(true))
        .Filterable()
        .DataSource(dataSource => dataSource
            .Ajax()
            .ServerOperation(false)
         );
    grid.Render();
}
Konstantin Dikov
Telerik team
 answered on 18 Apr 2018
1 answer
371 views

This had previously worked Ok.  Now when I add a controller or a new scaffolded item the scaffolder does not appear.   In VS2017CE in Tools >Extensions and Updates it lists Telerik ASP.NET Core VSExtensions with Version 2018.1.215.2 as being installed.

The only documentation I could find:

https://docs.telerik.com/aspnet-mvc/getting-started/scaffolding

The requirements listed in the doc:

Requirements
Visual Studio 2013 (with Update 2 or higher) or Visual Studio 2015
ASP.NET MVC 4 or ASP.NET MVC 5
C#
Entity Framework Data Model

Not exactly applicable to my set up.  We do not use EF but that hasn't been an issue in the past.  Please advise.

 

 

Pavlina
Telerik team
 answered on 18 Apr 2018
1 answer
123 views

Hello!

I've got some problems with grid using dynamic model and model validation. I am working on app for viewing and updating sql tables. Everything works perfect except updating values. With dynamic model, I am not able to validate model like in microsoft documentation. ModelState.IsValid property is always false ... and that is a problem. (Edited cells in grid are marked as unsaved after update due to ModelState.IsValid == false). Could you help me ? 

Thx,

Tom

Angel Petrov
Telerik team
 answered on 18 Apr 2018
1 answer
103 views

Hi

I am using asp .net core globalisation as per below documentation:

https://docs.telerik.com/aspnet-mvc/getting-started/globalization

Currently we support two language 'English' and 'French'.

If my current language is 'English' and i change to 'french', the kendo UI gets translated properly.

Where as, current language is 'french' and i change to 'English', UI doesn't gets changed to English strings.

I checked both server and client side culture is properly set as English.

 

Is there something i am missing.

 

Thanks and Regards

Sujin

 

Veselin Tsvetanov
Telerik team
 answered on 18 Apr 2018
5 answers
106 views

I have a condition where a grid that displays normally initially persists in showing the editor for the row on the bottom of the grid after you click the edit button (the first time).  If you click the Edit button again the editor will pop up but you can still see the same editor on the page behind it on the bottom of the grid.  The context and transactional part are fine but I cannot explain why this is happening.  It renders fine with respect to popups on other grids in the solution, like 25 of them.

There is no mistake in the html structure with <divs> that might lead to something like this.

Any suggestions would be welcome.

Reid
Top achievements
Rank 2
 answered on 17 Apr 2018
3 answers
309 views

Hi all,

I'm trying to implement persist state functionality in you Grid. I've followed this example.

localStorage["kendo-grid-orders-options"] = kendo.stringify(grid.getOptions());
.
.
.
grid.setOptions(JSON.parse(localStorage["kendo-grid-orders-options"]));

Everything works fine except for one detail. When I set a filter on DateTime field and then refresh the page, it throws an internal error in method.

The binary operator GreaterThanOrEqual is not defined for the types 'System.DateTime' and 'System.String'.

It's caused by the date in FilterDescriptor in DataSourceRequest, which is sent as a string instead of a DateTime (pict2). When it's sent directly from the filter (not from the stored options), it works correctly (pict1). Am I able to store not just the filter value, but also the information about the type?

Konstantin Dikov
Telerik team
 answered on 17 Apr 2018
2 answers
170 views

Hello, 

I have two ComboBoxes and Grid below them. The combo boxes are used to configure the grid's data source i.e. custom filtering/expanded filtering.

The issue is the following:

1. If I do not scroll the page the combobox options are displayed under the combobox.

2. If I scroll the page and then try to select something from the combobox options, the options are displayed over the grid.

I have attached 2 screen shots that show what is happening.

 

Thank you, 

Martin.

 

Neli
Telerik team
 answered on 16 Apr 2018
1 answer
127 views

Hey guys

Are these topics sufficient to learn Asp.net MVC Core?
Which other advice would you recommend?
I would like to learn Asp.net MVC Core in advance.
Thank you for your valuable information

TOPICS:

Model-View-Controller
Razor
Model Binding
Tag Helpers
Layout, Section, ViewStart
Routing
Bower
Dependency Injection
Entity Framework
Razor Pages
View Components
Filters
Session
Working with Angular
ASP.NET Identity

Konstantin Dikov
Telerik team
 answered on 16 Apr 2018
1 answer
314 views

I have a multiselect that contains a list of states. In the list there are states from different countries. I would like to be able to group the list by country but then have each group sorted by the state abreviation alphabetically. I'm having trouble finding some documentation on how to exctly do this.

 

Here is my multiselect:

@(Html.Kendo().MultiSelect()
.Name("primary_service_area")
.DataTextField("state_abreviation")
.DataValueField("state_abreviation")
.TagTemplate("<span class=\"multiselect-selected-value\">#= state_abreviation #</span>")
.ItemTemplate("<span>#= state_abreviation # - #= state_name #, #= country_code #</span>")
.DataSource(source =>
{
source
.Custom()
.ServerGrouping(true)
.Group(g => g.Add("country_code", typeof(string)))
.Transport(transport =>
transport.Read(read =>
{
read.Action("GetStates", "Company", new { country = "ALL"});
})
)
.ServerFiltering(false);
})
.Events(e => {
e.Change("multiSelect_Change").DataBound("multiSelect_databound");
})
.AutoClose(false)
.Value(Model.primary_service_area)
.HtmlAttributes(new { @class = "omni-multiselect" })
)

 

Here is my GetStates function:

public ActionResult GetStates(string country)
{
    try
    {
        List<State> selectedStates = new List<State>();
        if (country != null)
        {
            if (country == "ALL")
            selectedStates = states.OrderBy(s => s.country_code).ThenBy(s => s.state_abreviation).ToList();                
            else
            selectedStates = states.Where(s => s.country_code == country).ToList();
        }
 
        return Json(selectedStates.Select(s => new { state_abreviation = s.state_abreviation, state_name = s.state_name, country_code = s.country_code }));
    }
    catch (Exception ex)
    {
        return Json("");
    }
}
Neli
Telerik team
 answered on 13 Apr 2018
1 answer
936 views

Hi there

I have imported the telerik mvc core project from visual studio  2017 in windows to Vs Code in Ubuntu 

while installing the dependencies.i got this error  

error : The local source '/home/opendev/Documents/projects/CoreApp02/C:/Program Files (x86)/Progress/Telerik UI for ASP.NET Core R1 2018/wrappers/aspnetcore/Binaries/AspNet.Core' doesn't exist. [/home/opendev/Documents/projects/CoreApp02/PharmaCoreApp02/PharmaCoreApp02.csproj]

 

How can i resolve this ?

Regards 

Muhammad Arsalan Khan 

 

 

Veselin Tsvetanov
Telerik team
 answered on 12 Apr 2018
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?