I would like to allow the user to add columns at runtime and inline edit the column header text. Is this possible?
1 Answer, 1 is accepted
answered on 28 Apr 2020, 02:59 PM
Thank you for participating in our Blazor community!
Showing/hiding columns at runtime is currently available as showcased in this demo: https://demos.telerik.com/blazor-ui/grid/columns. Also there is an open Feature Request on our Feedback Portal regarding a Column Menu and also in the thread there is a solution on how to implement one: https://feedback.telerik.com/blazor/1450105-column-chooser. A live demo of the Column Menu can be seen in our product suite for MVC, link here: https://demos.telerik.com/aspnet-mvc/grid/column-menu. You can Follow this Feature Request for email notifications on status updates and I believe you have already added your Vote to it. If you want to let the user control some aspects of those columns, you should let them edit the grid in the example (or the desired portions of it) so they can generate the grid column descriptor data.
On the second topic, we have an available Header Template (more information here: https://docs.telerik.com/blazor-ui/components/grid/templates#header-template) where you can define your own rules for changing the Title, but leaves icons for Filtering and Sorting available. Another option would be to add a simple button that toggles a bool variable and if the value is true show a Telerik TextBox and use it to set the new value for the Title, otherwise hide the Textbox.
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic. Our thoughts here at Progress are with those affected by the outbreak.