Completed
Last Updated: 19 Jul 2021 10:34 by ADMIN
Created by: Alberto
Comments: 3
Category: UI for Blazor
Type: Bug Report
1

Hi!

Im using a Grid component InCell Editing the OnDelete, OnUpdate handlers are working fine but OnCreate handler its not working. By the way im using a service to manage the CRUD operations as follows

 

Page Component

@page "/districts"
@using MVC.Services
@using MVC.Models
@using System.ComponentModel.DataAnnotations
@inject IDistrictService DistrictService
<h3>Districts</h3>
<TelerikGrid Data="@district" Sortable="true" EditMode="@GridEditMode.Incell"
             Height="500px"
             Pageable="true" PageSize=@PageSize
             OnUpdate=@UpdateItem OnDelete=@DeleteItem OnCreate=@CreateItem OnCancel="@OnCancelHandler">
    <GridToolBar>
        <GridCommandButton Command="Add" Icon="add">Add District</GridCommandButton>
    </GridToolBar>
    <GridColumns>
        <GridColumn Field="@(nameof(District.Id))" Editable="false" />
        <GridColumn Field="@(nameof(District.Description))" Title="Description" />
        <GridColumn Field="@(nameof(District.EnableApprovalWorkflow))" Title="Enable Approval Workflow" />
        <GridCommandColumn>
            <GridCommandButton Command="Delete" Icon="delete">Delete</GridCommandButton>
        </GridCommandColumn>
    </GridColumns>
</TelerikGrid>
@code {
    int PageSize = 15;
    IEnumerable<District> district;

    protected override async Task OnInitializedAsync()
    {
        await GetGridData();
    }
    async Task GetGridData()
    {
        district = await DistrictService.DistrictList();
    }
    async Task CreateItem(GridCommandEventArgs args)
    {
        District item = (District)args.Item;
        await DistrictService.DistrictInsert(item);
        await GetGridData();
    }

    void OnCancelHandler(GridCommandEventArgs args)
    {
        District item = (District)args.Item;
    }

    async Task DeleteItem(GridCommandEventArgs args)
    {
        District item = (District)args.Item;
        await DistrictService.DistrictDelete(item.Id);
        await GetGridData();
    }

    async Task UpdateItem(GridCommandEventArgs args)
    {
        District item = (District)args.Item;
        await DistrictService.DistrictUpdate(item);
        await GetGridData();
    }
}

Service Logic


using Dapper;
using Microsoft.Data.SqlClient;
using MVC.Models;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MVC.Services
{
    public class DistrictService : IDistrictService
    {
        private readonly SqlConnectionConfiguration _configuration;
        public DistrictService(SqlConnectionConfiguration configuration)
        {
            _configuration = configuration;
        }
        public async Task<bool> DistrictInsert(District district)
        {
            using (var conn = new SqlConnection(_configuration.Value))
            {
                var parameters = new DynamicParameters();
                parameters.Add("Description", district.Description, DbType.String);
                parameters.Add("EnableApprovalWorkflow", district.EnableApprovalWorkflow, DbType.Boolean);
                await conn.ExecuteAsync("spLookupDistrict_Insert", parameters, commandType: CommandType.StoredProcedure);
            }
            return true;
        }
        public async Task<IEnumerable<District>> DistrictList()
        {
            IEnumerable<District> districts;
            using (var conn = new SqlConnection(_configuration.Value))
            {
                districts = await conn.QueryAsync<District>("spLookupDistrict_List", commandType: CommandType.StoredProcedure);
            }
            return districts;
        }
        public async Task<IEnumerable<District>> DistrictSearch(string @Param)
        {
            var parameters = new DynamicParameters();
            parameters.Add("@Param", Param, DbType.String);
            IEnumerable<District> districts;
            using (var conn = new SqlConnection(_configuration.Value))
            {
                districts = await conn.QueryAsync<District>("spLookupDistrict_Search", parameters, commandType: CommandType.StoredProcedure);
            }
            return districts;
        }
        public async Task<District> District_GetOne(int @Id)
        {
            District district = new District();
            var parameters = new DynamicParameters();
            parameters.Add("@Id", Id, DbType.Int32);
            using (var conn = new SqlConnection(_configuration.Value))
            {
                district = await conn.QueryFirstOrDefaultAsync<District>("spLookupDistrict_GetOne", parameters, commandType: CommandType.StoredProcedure);
            }
            return district;
        }
        public async Task<bool> DistrictUpdate(District district)
        {
            using (var conn = new SqlConnection(_configuration.Value))
            {
                var parameters = new DynamicParameters();
                parameters.Add("Id", district.Id, DbType.Int32);

                parameters.Add("Description", district.Description, DbType.String);
                parameters.Add("EnableApprovalWorkflow", district.EnableApprovalWorkflow, DbType.Boolean);

                await conn.ExecuteAsync("spLookupDistrict_Update", parameters, commandType: CommandType.StoredProcedure);
            }
            return true;
        }
        public async Task<bool> DistrictDelete(int Id)
        {
            var parameters = new DynamicParameters();
            parameters.Add("@Id", Id, DbType.Int32);
            using (var conn = new SqlConnection(_configuration.Value))
            {
                await conn.ExecuteAsync("spLookupDistrict_Delete", parameters, commandType: CommandType.StoredProcedure);
            }
            return true;
        }
    }
}

Declined
Last Updated: 17 Jul 2021 14:24 by ADMIN

Hi !,

 

I just installed and started to use Telerik Blazor , all controls are working fine but when trying to use the Dialog Component, after adding the cascading parameter in the code section i getting the following error :

Dialog compoentn error

 

https://ibb.co/48wNznW

Thank you for your support.

 

Regards,

Alberto

 

Duplicated
Last Updated: 04 Apr 2022 13:54 by Max
Created by: Benjamin
Comments: 2
Category: UI for Blazor
Type: Feature Request
8

The File Manager (exactly like https://www.telerik.com/aspnet-core-ui/file-manager) but for Blazor would be very nice.

There are no File Manager out there and this feature could support the purchase decision.

Unplanned
Last Updated: 12 Jul 2021 15:05 by ADMIN

Hi.  Still in the trial phase, and I was curious about this.

I'm trying to develop two apps, one in ASP.NET Core and the other in Blazor WASM.

I found the ASP.NET Core Bottom Navigation which is perfect for the ASP.NET Core project.  Shown here.

However, I'd like to be able to show continuity as users transition to the Blazor project and I don't see a BottomNavigation component listed for Blazor.

Is this something that can be added to the Blazor UI tools, or is there an example someplace I can use to get started?

Thanks in advance.

Completed
Last Updated: 09 Sep 2021 08:30 by ADMIN
Release 2.27.0

Steps to reproduce this are pretty simple.  On the Blazor Wizard demo at this link:

 

https://demos.telerik.com/blazor-ui/wizard/overview?_ga=2.135424305.1441063975.1625423575-1371905116.1594731896&_gac=1.21975282.1624709398.85e5788e7d791cbf2099185965b0351c

 

- Enter a password on step 1

- Click 'Next' to bring you to the 'Shipping' step

- Set focus to the 'City' input box.  I clicked to the end of the default string that is pre-populated as 'Torino'

- Press the left arrow key.  This sends you back to Step 1 (Registration)

 

This is a pretty big stumbling block for using the Wizard component, but I may be missing some kind of setting or code that will resolve this.

Completed
Last Updated: 29 Jun 2021 20:06 by ADMIN
Created by: Steffen
Comments: 1
Category: UI for Blazor
Type: Feature Request
0

Hi,

we are having a hard time to come up with a general application layout (menu/navigation).

We found PanelBar, Menu and Drawer... are there any other controls related to menu & navigation?

A more UX oriented documentation (and not only for the technical components individually) would be nice e.g. like they do it here: Overview | Clarity Design System

 

Kind regards

Steffen

Duplicated
Last Updated: 26 Jun 2021 16:01 by ADMIN
Created by: Aleksandr
Comments: 1
Category: UI for Blazor
Type: Feature Request
1
everything is in subject
Completed
Last Updated: 02 Jan 2022 11:39 by ADMIN
Include row and column index & Field info in GridCellRenderEventArgs & row index in GridRowRenderEventArgs so that context can be used to look up ancillary information.
Unplanned
Last Updated: 01 May 2024 12:05 by ADMIN
Created by: Emil
Comments: 3
Category: UI for Blazor
Type: Feature Request
6
Is there a chance that there will be added a Treemap component in the near future?
Duplicated
Last Updated: 21 Jun 2021 13:13 by ADMIN
Created by: Fairoz
Comments: 3
Category: UI for Blazor
Type: Feature Request
0

Hi,

Would be great if there could be a Timeline component for Blazor. Just like the Timeline component for WPF at "https://docs.telerik.com/devtools/wpf/controls/radtimeline/overview".

I need that component or something similar to show time based instances of activity on a particular item. A lack of such visualisation feature is making us hold on to the WPF one. 

Thanks.

Duplicated
Last Updated: 21 Jul 2022 09:00 by ADMIN
Created by: Lance
Comments: 8
Category: UI for Blazor
Type: Bug Report
2

<TelerikDatePicker Id="startDate" @bind-Value="@StartDate" Width="160px" Format="dd-MMM-yy"></TelerikDatePicker>

DateTime StartDate=DateTime.Now

 

When our users type to click on the year and type another one they lose one of the digits - so if they try typing 19 or 18 for instance then it sets the date to year 01

 

 

Completed
Last Updated: 11 Apr 2022 11:16 by ADMIN
Release 3.2.0
OutOfMemory exception when an infinite loop updates the Telerik UI for Blazor components in an EditForm
Duplicated
Last Updated: 12 Jun 2021 06:28 by ADMIN
Created by: Don
Comments: 1
Category: UI for Blazor
Type: Feature Request
0
Allow pre-canned major cities, custom pins, and custom lat/long with label name.

Example live daylight map: https://www.flightradar24.com/

Completed
Last Updated: 14 Jun 2021 13:01 by ADMIN
Created by: Chris
Comments: 1
Category: UI for Blazor
Type: Feature Request
0

It would be nice to switch the color schemes used by the telerik Blazor components on-the-fly in an application (i.e. switch from light mode to dark mode). I realize you have a JS approach to this problem, however that requires maintaining multiple stylesheets and custom javascript, which we are trying to avoid in a Blazor project. I like the approach used by MudBlazor where basically all css colors are variables that can be easily switched at runtime without any javascript:

https://mudblazor.com/wasm/customization/theming/overview

Completed
Last Updated: 19 Sep 2024 06:21 by ADMIN
Release 2024 Q4 (Nov)
Created by: Michał
Comments: 3
Category: UI for Blazor
Type: Bug Report
14

When filtering or editing a Grid with enum data, the Name property of their Display parameter is respected.

However, in the initial view mode of the Grid the Name property is not applied and the enum values are rendered regardless of whether or not their Display parameter has a Name property defined.

 

==========

ADMIN EDIT

==========

In the meantime, a workaround you might try is to create a custom method to check whether Display attribute is defined and get and display its Name property, otherwise display the Enum's member name.

You can then use a Template for the column that uses enum data, cast its context to the model you are using and invoke the method on the field containing the enum. The sample below demonstrates how you can achieve this.

@using System.ComponentModel.DataAnnotations
@using System.Reflection

<TelerikGrid Data=@MyData EditMode="@GridEditMode.Inline" Pageable="true" Height="500px"
             OnUpdate="@UpdateHandler" FilterMode="@GridFilterMode.FilterRow">
    <GridColumns>
        <GridColumn Field=@nameof(SampleData.ID) Editable="false" Title="ID" />
        <GridColumn Field=@nameof(SampleData.Name) Title="Name" />
        <GridColumn Field=@nameof(SampleData.Role) Title="Position">       
            <Template>
                @{
                    var currentEmployee = context as SampleData;
                    var currentRole = GetDisplayName(currentEmployee.Role);                        
                }

                @currentRole
            </Template>
        </GridColumn>
        <GridCommandColumn>
            <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Update</GridCommandButton>
            <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
        </GridCommandColumn>
    </GridColumns>
</TelerikGrid>

@code {
    //custom method to check whether Display attribute is defined and get and display its Name property, otherwise display the Enum's member name
    public string GetDisplayName(Enum val)
    {
        return val.GetType()
                  .GetMember(val.ToString())
                  .FirstOrDefault()
                  ?.GetCustomAttribute<DisplayAttribute>(false)
                  ?.Name
                  ?? val.ToString();
    }


    public void UpdateHandler(GridCommandEventArgs args)
    {
        SampleData item = (SampleData)args.Item;

        //update the view-model
        var index = MyData.FindIndex(i => i.ID == item.ID);
        if (index != -1)
        {
            MyData[index] = item;
        }

        //perform actual data source operations here
    }

    //model and dummy data generation
    public class SampleData
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public Role Role { get; set; }
    }

    public enum Role
    {
        [Display(Name = "Manager")]
        ManagerRole,
        [Display(Name = "Employee")]
        EmployeeRole,
        [Display(Name = "Contractor")]
        ContractorRole
    }

    public List<SampleData> MyData { get; set; }

    protected override void OnInitialized()
    {
        MyData = new List<SampleData>();

        for (int i = 0; i < 50; i++)
        {
            MyData.Add(new SampleData()
            {
                ID = i,
                Name = "name " + i,
                Role = (Role)(i % 3) // just some sample to populate initial values for the enum
            });
        }
    }
}

Duplicated
Last Updated: 27 May 2021 11:09 by ADMIN
Created by: Ardi
Comments: 4
Category: UI for Blazor
Type: Feature Request
0
Hi,

I'd like to be have possibility to override <TelerikTimePicker /> buttons' actions or determine which button was clicked.
There's no built-in way to differentiate "Now" and "Set" button click on <TelerikTimePicker /> .

For example I'd like to be able to determine when "Now" button was clicked and modify the time accordingly (set different timezone offset for example). 

Kind regards,
Ardi Aver 
Duplicated
Last Updated: 17 May 2021 21:40 by Lance
Created by: Lance
Comments: 2
Category: UI for Blazor
Type: Bug Report
0

Hi, 

I reported this last week but it got declined ??  Perhaps a picture will help

The default grid displays the filter icon OVER the text and this makes the text unreadable.  This is just the material format from your websites themebuilder

The icon should be closer to the column width adjuster - as you can see from the attachment there is more space between the columns than there is text

I would expect it to be  "| Description  Y |"  and not "|  Desc... Y        |" which is what its doing.  (really the space between the filter icon and the column adjusted is just wasted and there seems to be no way to fix it)

I've tried to move the k-i-filter using CSS and while giving it a left margin of 32px is working ok and making it look reasonable, it still has the circle highlighter when you click it in the wrong place and I can't figure out how to move that also.

 

Completed
Last Updated: 26 May 2021 14:51 by ADMIN

There doesn't seem to be a way to deselect the selected row either by clicking on a selected row again or by two-way-binding and setting it to an empty list.

 

This would be pretty handy as currently the only way that makes sense for me is to make no use of selection mode at all.

Declined
Last Updated: 17 May 2021 06:04 by ADMIN
Created by: Lance
Comments: 3
Category: UI for Blazor
Type: Bug Report
0

Hi,

I have a grid, it has quite a few columns - maybe 10-15, and this is causing 2 problems which are kind of related.

First problem is it tries to squash them all onto the screen making them all narrow and that hides the header text - I have played with horizontal scrollbar but so far I've only managed to resize them after it loads (or to workaround that I have tried save state after I've resized them with some success, but i'd really prefer the default starting point to be wider than the screen - if you have an example you can show me how to do this?)

Next problem is when I add a filter row to it - its basically unusable.  Even though the columns are narrow, they look like they should be wide enough, but instead what happens is the filter button appears in the middle by itself and nothing else appears - sometimes I see " ___ Y      "  but most of the time its "        Y         ".  It seems very poor use of space by default.  This is the material theme. 

Can you help?  I did try with the filter menu but it is more complicated for our users and they prefer the idea of filterrow, plus it also crashes intermittently (see below for callstack).

 

Intermittent crash in filter menu - happens when user clicks the menu then clicks filter, before the filter menu is displayed.
Error: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Blazor.Components.Common.Filters.FilterList.TelerikFilterList.GetFilterOperators()
   at Telerik.Blazor.Components.Common.Filters.FilterList.TelerikFilterList.InitFilterOperators()
   at Telerik.Blazor.Components.Common.Filters.FilterList.TelerikFilterList.OnInitializedAsync()
   at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()
Completed
Last Updated: 31 Jan 2022 15:46 by ADMIN
Release 3.0.1

---

ADMIN EDIT

The following should let the multiselect render above the custom yellow element, but it does not. A workaround is available as the second CSS snippet that you can uncomment.

<style>
    /*should work but does not*/
    .high-zindex {
        z-index: 124;/*note how this is higher than the z-index of the div element, and is higher than the default z-index of the component*/
    }

    /*workaround*/
    .k-animation-container {
        z-index: 15000;
    }
</style>

<div style="position: absolute; z-index: 123; width: 600px; height: 200px; background: yellow;">
    <TelerikMultiSelect Data="@Countries"
                        @bind-Value="@Values"
                        Placeholder="Enter Balkan country, e.g., Bulgaria"
                        ClearButton="true" AutoClose="false"
                        PopupClass="high-zindex">
    </TelerikMultiSelect>
</div>

@code {
    List<string> Countries { get; set; } = new List<string>();
    List<string> Values { get; set; } = new List<string>();

    protected override void OnInitialized()
    {
        Countries.Add("Albania");
        Countries.Add("Bosnia & Herzegovina");
        Countries.Add("Bulgaria");
        Countries.Add("Croatia");
        Countries.Add("Kosovo");
        Countries.Add("North Macedonia");
        Countries.Add("Montenegro");
        Countries.Add("Serbia");
        Countries.Add("Slovenia");

        base.OnInitialized();
    }
}

---