Telerik Forums
UI for ASP.NET Core Forum
3 answers
205 views

In demo https://demos.telerik.com/kendo-ui/spreadsheet/custom-editors

cells: [

   { value: "Select item:", bold: true },

   { background: "#fef0cd",

   validation:{

       dataType: "list",

       showButton: true,

       comparerType: "list",

       from: '{ "Foo item 1", "Bar item 2", "Baz item 3" }',

       allowNulls: true,

       type: "reject"}

    }]

I need to choose multi item.

How do i fix it?

Thanks !

Neli
Telerik team
 answered on 23 Apr 2018
8 answers
187 views

When I drop down a dropdown list (DropDownListFor) , it's items are not margined and are truncating to the left.  Can anyone suggest a style to override or a way to set this? 

Thanks

Dimitar
Telerik team
 answered on 23 Apr 2018
1 answer
327 views

I have a number List Boxes with a single context menu that is shared across them.

The context menu correctly displays when I right click the list box item but it doesn't seem to set the target value of the Select or Open events.

The menu configuration is:

@(Html.Kendo().ContextMenu()
        .Name("listbox_contextmenu")
        .Target("[role=listbox]")
        .Filter("[role=option]")
        .Orientation(ContextMenuOrientation.Vertical)
        .Animation(animation =>
        {
            animation.Open(open =>
            {
                open.Fade(FadeDirection.In);
                open.Duration(500);
            });
        })
        .Items(items =>
        {
            items.Add().Text("Escalate to Management");
            items.Add().Separator(true);
            items.Add().Text("Email Allocated User");
        })
        .Events(events =>
        {
            events.Open("contextMenuOpen").Select("contextMenuSelect");
        })
)

 

The java script function do nothing at the moment:

function contextMenuOpen(e) {
    alert('e.item is ' + JSON.stringify($(e.item)));
    alert('e.target is ' + JSON.stringify($(e.target)));
}
function contextMenuSelect(e) {
    alert('e.item is ' + JSON.stringify($(e.item)));
    alert('e.target is ' + JSON.stringify($(e.target)));
}

 

I'm hoping you can point out what I'm doing wrong here.

Many Thanks,

Rob

Neli
Telerik team
 answered on 20 Apr 2018
3 answers
171 views

I am trying to plan a way to negate the update process if the value the user has entered on a new record would be a duplicate.

This is in a custom editor on a popup so I could have an Ajax action when the user exits and/or changes the field value but I am not sure how to check if it is in edit or insert mode inside the custom editor.

Is there a suggested pattern to use here for this?

Thanks

Viktor Tachev
Telerik team
 answered on 19 Apr 2018
1 answer
3.3K+ views

Good day,

 

I have a question since all solutions I've found so far didn't work in my case. Hre's a brief description of what I have... So, I have my kendoGrid with all the info displayed. I'm trying to make a button for certain rows which will call a method in my Controller. Here's the code on my page:

@(Html.Kendo().Grid<DisplayEntitiesViewModel>()
              .Name("CustomersGrid")
              .Columns(columns =>
              {
                  columns.Bound(c => c.CustomerId).Hidden(true);
                  columns.Bound(c => c.CustomerName)
                      .Width(150);
                  columns.Bound(c => c.CustEmail)
                      .Width(800);
                  columns.Command(command => command
                      .Custom("Add Contact")
                      .Visible("showButton")
                      .Click("AddContact")).Width(180);
              })
              .HtmlAttributes(new {style = "height: 580px; width: 1133px; margin-left: 16px"})
              .Scrollable()
              .Groupable()
              .Sortable()
              .Pageable(pageable => pageable
                  .Refresh(true)
                  .PageSizes(true)
                  .ButtonCount(5))
              .DataSource(dataSource => dataSource
                  .Ajax()
                  .Read(read => read.Action("ReadCustomers", "MyController"))
                  .PageSize(20)
              )
              )

 

Here's my script with the AJAX call:

function AddContact(c) {
 
        var row = $(c.target).closest("tr");
        var grid = $('#acombaGrid').data('kendoGrid');
        var dataItem = grid.dataItem(row);
 
        $.ajax({
            url: '@Url.Action("DispalyEntities", "MyController")',
            dataType: "json",
            contentType: "application/json",
            data: {
                customerId: dataItem.CustomerId
            },
            cache: false,
            type: "POST"
        });
    }

 

Here's in brief my Controller:

public IActionResult DispalyEntities(string customerId)
{
    return View();
}

 

My problem is, no matter what I've done so far... my costomerId passed to the controller is always null. Could you please point me what's wrong with it. Thanks in advance for doing so.

Jack
Top achievements
Rank 1
 answered on 18 Apr 2018
1 answer
182 views

https://demos.telerik.com/kendo-ui/spreadsheet/custom-editors

 

cells: [

    { value: "Select item:", bold: true },

{ background: "#fef0cd", validation: { dataType: "list", showButton: true, comparerType: "list", from: '{ "Foo item 1", "Bar item 2", "Baz item 3" }', allowNulls: true, type: "reject"} }]

Neli
Telerik team
 answered on 18 Apr 2018
1 answer
593 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
393 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
132 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
111 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?