Telerik Forums
UI for ASP.NET Core Forum
1 answer
129 views
I've been looking through demos of document processing, and I'm only seeing format conversion in the demos for ASP.Net Core. When I view demos for document processing for ASP.Net MVC, I see mail merge and other functionality. Is mail merge and editing also supported in UI for ASP.Net Core?
Nencho
Telerik team
 answered on 30 Oct 2019
2 answers
835 views

Hello,

 

It's seem that ForeighKey always use GridForeignKey.cshtml…

I try to decorate the attribute UIHint with another cshtml (Shared/EditorTemplates) and it's not working.  My dropdown list in the grid always use GridForeignKey.cshtml.

 

Any idea?

Louis
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 26 Oct 2019
1 answer
249 views
Hello,
Out of the box, using the 'Telerik UI for ASP.NET Core' -> Create New Telerik Project (Grid and Menu) extension in Visual Studio 2019 + .NET Core 3.0 does not appear to work correctly. The project will get created and will build and run correctly, however when I try to add a new View or Controller I will get the attached error. I kept adding libraries that the error was complaining about until it worked, however I'm not sure this was the correct way to go about fixing this (see attached). 

Is there a reason the out of the box extension to create a project is not working?
I've submitted a bug regarding this as well. 

Thanks,
Dave
Dimitar
Telerik team
 answered on 25 Oct 2019
3 answers
261 views

Hello,
we are currently following this guide (https://docs.telerik.com/aspnet-core/getting-started/first-steps-cli)
to setup Telerik UI for ASP.NET Core 3.0.100 (not RC).
After we run "dotnet add package Telerik.UI.for.AspNet.Core" we see that the version "2016.3.914" is downloaded and installed, and NOT the version "2019.3.917" we see from here: https://www.telerik.com/account/product-download?product=UIASPCORE
Obviously with old this version "dotnet run" throws errors.

What are we missing?

We tried to downgrade to dotnet SDK 3.0.100-RC but nothing changes.
Forcing installing the specific version with "dotnet add package Telerik.UI.for.AspNet.Core -v 2019.3.917" returns error "Unable to find package Telerik.UI.for.AspNet.Core with version (>= 2019.3.917)"
Our platform is Linux and we downloaded dotnet sdk from here https://dotnet.microsoft.com/download/thank-you/dotnet-sdk-3.0.100-linux-x64-binaries
We have trial license of Progress® Telerik® UI for ASP.NET Core

 

Thanks for your support

 

my nuget.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
    <add key="telerik.com" value="https://nuget.telerik.com/nuget" />
  </packageSources>
  <packageSourceCredentials>
      <telerik.com>
           <add key="Username" value="enrico.papi@re-lab.it" />
         <add key="ClearTextPassword" value="*********" />
      </telerik.com>
  </packageSourceCredentials>
</configuration>

 

my csproj after we add the package:

<Project Sdk="Microsoft.NET.Sdk.Web">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
  </ItemGroup>
  <ItemGroup>
    <PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2016.3.914" />
  </ItemGroup>
</Project>

Dimitar
Telerik team
 answered on 25 Oct 2019
2 answers
1.9K+ views

Hi There,

I have a checkbox column in my grid, the change event works fine when page first loaded, but fails after page changed. Following is my code. Any help would be greatly appreciated.

 

@model IEnumerable<WebApplication1.Models.ProductViewModel>
    @(Html.Kendo().Grid(Model)
        .Name("grid")
        .Columns(columns =>
        {
            columns.Bound(c => c.ProductID).ClientTemplate("<input class='checkBoxCustom' type='checkbox' />").Title(" ").Filterable(false).Width(50);
            columns.Bound(p => p.ProductName);
            columns.Bound(p => p.UnitPrice).Width(150);
            //columns.Command(command => command.Destroy()).Width(150);
        })
        .Editable(editable => editable.Mode(GridEditMode.InCell))
        .Pageable()
        .Sortable()
        .Scrollable()
        .HtmlAttributes(new { style = "height:350px;" })
        .DataSource(dataSource => dataSource
            .Ajax()
            .Batch(true)
            .PageSize(2)
            .ServerOperation(false)
            //.Events(events => events.Error("errorHandler"))
            .Model(model =>
            {
                model.Id(p => p.ProductID);
                model.Field(p => p.ProductID).Editable(false);
            })
        )
    )
    <script>
        $(document).ready(function () {
  
            $('input.checkBoxCustom').on('change', function (e) {
                alert('hi');
            });
        });
    </script>
Nikolay
Telerik team
 answered on 24 Oct 2019
3 answers
623 views

Could you please replay i have 2 Q

1- i try to export excel and pdf  file from my kendo grid but not work i am use Core 2.2
Telerik UI for ASP.NET Core R1 2018 SP1
Source Code from this link
https://demos.telerik.com/aspnet-core/grid/excel-export
2- the telerik Report it's Support the Core 2.2 or not 

Thanks

Alex Hajigeorgieva
Telerik team
 answered on 24 Oct 2019
1 answer
107 views

Hi,

I have the following model:

public class SComponent
    {
        public string Id { get; set; }
        public string Name { get; set; }
 
        public KeyValuePair<string,string>[] Containers { get; set; }
    }

 

which is bound to the Grid:

 

@(Html.Kendo().Grid<SComponent>()
          .Name("grid")
          .ToolBar(toolbar => toolbar.Create())
          .Columns(columns =>
          {
              columns.Bound(p => p.Name).Width(200);
              columns.Command(command => { command.Edit(); command.Destroy(); }).Width(70);
          })
          .Sortable(sortable => { sortable.SortMode(GridSortMode.SingleColumn); })
          .Editable(ed => ed.Mode(GridEditMode.PopUp).TemplateName("SharedLibrary"))
          .DataSource(dataSource => dataSource.Ajax()
              .Model(model =>
              {
                  model.Id(p => p.Id);
              })
              .Read(read => read.Action(nameof(SController.Editing_ReadSharedLibraries), "S", new { key = Model.Product.Keys.First() }))
              .Update(update => update.Action(nameof(SController.Editing_UpdateSharedLibrary), "S", new { key = Model.Product.Keys.First() }))
              .Destroy(update => update.Action(nameof(SController.Editing_DeleteSharedLibrary), "S", new { key = Model.Product.Keys.First() }))
              .Create(update => update.Action(nameof(SController.Editing_CreateNewSharedLibrary), "S", new { key = Model.Product.Keys.First() }))
          )
       )

 

As you can see grid edit mode is a popup which is a custom template looking like this:

@model SComponent
 
<div class="k-edit-label">
    @Html.LabelFor(model => model.Name)
</div>
<div class="k-edit-field">
    @Html.Kendo().TextBoxFor(model => model.Name)
    @Html.ValidationMessageFor(model => model.Name)
</div>
 
<div class="k-edit-label">
    @Html.LabelFor(model => model.Containers)
</div>
<div class="k-edit-field">
    @(Html.Kendo().MultiSelectFor(model => model.Containers)
         .DataTextField("Value")
         .DataValueField("Key")
         .ValuePrimitive(true)
         .Placeholder("Select containers...")
         .IgnoreCase(true)
         .Filter("contains")
         .DataSource(source =>
         {
             source.Read(read =>
             {
                 read.Action("Editing_ReadContainers", "Structurizr");
             })
             .ServerFiltering(true);
         })
    )
    @Html.ValidationMessageFor(model => model.Containers)
</div>

 

And the controller method returning the multiselect list is like this:

public IActionResult Editing_ReadContainers([DataSourceRequest] DataSourceRequest request)
       {
           var model = new SModel(null, _st.GetWorkspaceAsync(string.Empty).Result);
           var dsResult = model.Containers.Select(x=>KeyValuePair.Create(x.Id, x.Name)).ToDataSourceResult(request);
           var json = JsonConvert.SerializeObject(dsResult);
           return Content(json, "application/json");
       }

 

But when server returns values back to the UI it fails with the javascript error:

 kendo.all.js:7232 Uncaught TypeError: e.slice is not a function
    at init.success (kendo.all.js:7232)
    at success (kendo.all.js:7149)
    at Object.n.success (kendo.all.js:6055)
    at i (jquery.min.js:2)
    at Object.fireWith [as resolveWith] (jquery.min.js:2)
    at y (jquery.min.js:4)
    at XMLHttpRequest.c (jquery.min.js:4)

 

Any idea how this can be fixed ?

Aleksandar
Telerik team
 answered on 23 Oct 2019
4 answers
112 views

Have a dependent grid column that is a dropdown based on a parent column.

The dependent field is filtered on its accepted values on the popup editor based on the selection on the parent column.

But on the grid, I am just showing the current value, like so:

columns.Bound(o => o.CountyId).ClientTemplate("#if(CountyId.Value!=null){##=CountyId.Value##}#").Sortable(false).Groupable(false).Filterable(false);

[UIHint("CountyEditor")]
[Display(Name = "County")]
public ChildValueViewModelNullable CountyId { get; set; }

 

Would like to enable filtering "AND" sorting on this column.  Would be happy with just a text field where users can enter in the search term for the filtering.

Do you have code/sample for this?

Thnks.

Viktor Tachev
Telerik team
 answered on 23 Oct 2019
2 answers
602 views

Hi

I'm using Telerik_UI_for_ASP.NET_AJAX_2019_1_215_Dev

This is a licensed version, that my company has purchased.

Why do I get the 'Trial Message' on the controls?

thx

 

 

Rumen
Telerik team
 answered on 23 Oct 2019
5 answers
462 views

When I filter out data on tree list I am running into 2 issues:

 1) the number of pages doesn't reflect the number of items shown in the list

 2) the child items will remain in the list even if filtered out

My expectation is that when filter is applied, it would only show Carla and have 1 page on paging bar.  Strangely if I execute $("#AttendeeGrid").data("kendoTreeList").dataSource.read(); again after filtering through browser console the children are then removed.

View

<script type="text/javascript">
    var filter = false;
 
    function toggleFilter() {
        filter = !filter;
        $("#AttendeeGrid").data("kendoTreeList").dataSource.read();
        $("#AttendeeGrid").data("kendoTreeList").dataSource.page(1);
    }
 
    function attendeeParams() {
        return {
            myFilter: filter
        }
    }
</script>
@(Html.Kendo().TreeList<AttendeeItem>()
            .Name("AttendeeGrid")
            .Columns(columns =>
            {
                columns.Add().Field(x => x.firstName).Title("First");
            })
        .Sortable()
        .DataSource(dataSource => dataSource
        .ServerOperation(false)
        .Read(read => read.Action("attendee_Read", "Home").Data("attendeeParams"))
        .Model(m => {
            m.Id(x => x.primaryRegistrationId);
            m.ParentId(x => x.parentRegistrationId);
            m.Expanded(true);
        })
        )
        .Pageable(p => p.PageSize(5))
        .Scrollable(false)
      )
<button onclick="toggleFilter()">Toggle filter</button>

 

Controller

...
public IActionResult attendee_Read([DataSourceRequest] DataSourceRequest request, GetAttendeesParams getAttendeesParams)
        {
            AttendeeItem[] items;
            if (getAttendeesParams.myFilter)
            {
                items = new[]
                {
                    new AttendeeItem
                    {
                        primaryRegistrationId = 1,
                        firstName = "Carla",
                        parentRegistrationId = null
                    }
                };
            }
            else
            {
                items = new[]
                {
                    new AttendeeItem
                    {
                        primaryRegistrationId = 1,
                        firstName = "Carla",
                        parentRegistrationId = null
                    },
                    new AttendeeItem
                    {
                        primaryRegistrationId = 2,
                        firstName = "Roger",
                        parentRegistrationId = null
                    },
                    new AttendeeItem
                    {
                        primaryRegistrationId = 3,
                        firstName = "Katy",
                        parentRegistrationId = null
                    },
                    new AttendeeItem
                    {
                        primaryRegistrationId = 4,
                        firstName = "Bob",
                        parentRegistrationId = null
                    },
                    new AttendeeItem
                    {
                        primaryRegistrationId = 5,
                        firstName = "Avni",
                        parentRegistrationId = 1
                    },
                    new AttendeeItem
                    {
                        primaryRegistrationId = 6,
                        firstName = "George",
                        parentRegistrationId = null
                    },
                };
                 
            }
 
            return Json(items.ToTreeDataSourceResult(request));
        }
    }
 
    public class AttendeeItem
    {
        public string firstName { get; set; }
        public int primaryRegistrationId { get; set; }
        public int? parentRegistrationId { get; set; }
    }
 
    public class GetAttendeesParams
    {
        public bool myFilter { get; set; }
    }
Tsvetomir
Telerik team
 answered on 22 Oct 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?