How do I add a new row to the GridLayout through code? Then, I'll need to add a new GridLayoutItem to the new row. Then, I need to add a custom component to that GridLayoutItem.
1 Answer, 1 is accepted
0
Hristian Stefanov
Telerik team
answered on 06 Feb 2025, 08:15 AM
Hi Joel,
To dynamically add a new row and a GridLayoutItem containing custom elements to a TelerikGridLayout, you can use conditional rendering in Razor. The TelerikGridLayout does not support direct manipulation of rows or items through code-behind, but you can achieve this by managing the layout through a list of items. Use a list to store your items and iterate over them to render the rows and items dynamically.
Here is a brief example that you can use as a starting point: