Declined
Last Updated: 05 Apr 2023 18:32 by ADMIN
Ed
Created on: 29 Mar 2023 21:19
Category: Grid
Type: Feature Request
0
TelerikGrid dropdown column

The Blazor TelerikGrid component should support a dropdown column.  It should be exactly the same as the dropdown column in the Ajax grid.

https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/columns/column-types#dropdown

3 comments
ADMIN
Dimo
Posted on: 05 Apr 2023 18:32

Hello Ed,

Surely, technically we can add a built-in DropDownList editor, but the number of required additional parameters will defeat the purpose - the code will be as bulky, as if you add an EditorTemplate with a component inside. Moreover, the EditorTemplate provides complete flexibility with regard to

  • Which component to use, including one that is not ours
  • When, how and what to update in the original data item
  • Let's not forget scenarios that may require custom data-binding or virtualization. Unlike the ASP.NET AJAX controls, the Blazor components do not communicate with the data layer directly.

Regards,
Dimo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Ed
Posted on: 05 Apr 2023 16:10

Dimo,

It could be either scenario.  The whole point is to not have to use a template for a dropdown editor in the grid.  This is a common scenario and should be provided for.  You have it in the ASP.Net Ajax RadGrid, so there is no reason why you could not have it here.  

It would function EXACTLY the same way as it does with an EditorTemplate.  The difference is the syntax of the markup of the grid column.  

This can be done, I'm sure you can make it happen.

ADMIN
Dimo
Posted on: 05 Apr 2023 10:05

Hi Ed,

Are you asking about a foreign key column or you just need a dropdown with a collection of choices during editing?

For the first assumption - we prefer not to have this as a built-in feature for multiple reasons, related to our Blazor components' architecture and the fact that they are decoupled from the data. So, if you have this scenario, bind the <GridColumn> to the foreign key ID, and then use templates for editing, filtering, etc., as in the linked KB article.

For the second assumption - use an EditorTemplate, as in the linked example.

Generally, we recommend developers to adjust the model to the Grid API, which in some cases may mean flattening data in a Grid view model. Doing the opposite may not always produce the best results in terms of developer experience (e.g. too much templating in the foreign key column scenario).

Regards,
Dimo
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.