Nicolas
asked on 29 Nov 2021, 11:47 AM
| edited on 30 Nov 2021, 08:00 AM
Hello,
Is it possible to have a different template per row according to a value of a column in the grid?
Example:
If ForecastType=1
If ForecastType=2
If ForecastType=3
yellow areas are editable
1 Answer, 1 is accepted
0
Tsvetomir
Telerik team
answered on 02 Dec 2021, 07:36 AM
Hi, Nicolas,
Indeed, it is possible to have different row templates based on a condition. Please find the REPL example below that displays different rows based on a condition from the data item:
As per the editing, please note that it comes from the data source, or, if you would like to dynamically make a field editable/non-editable, I recommend the following article:
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/.
As per the custom scenario with the order of the TD elements, the row template has no limitation on how exactly the elements have to be structured. You could use a combination of HTML and CSS to achieve the design at hand. Usually, such custom scenarios are created by the developer as the support services focus more on the exposed options and how to utilize them rather than providing end-to-end solutions.
Hi Nicolas, indeed, this is the cleanest and most recommended for dynamically enabling the editing for a specific field. However, this requires for setting up both - the column in the Columns declaration as well as in the ClientRowTemplate.