I work on blazor server side . I need to add button column picker visibility
so by click button if I select column application id and application name then 2 columns only will display and another columns will hide
I work on blazor server side . I need to add button column picker visibility
so by click button if I select column application id and application name then 2 columns only will display and another columns will hide
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
ahmed salahPosted May 2, 2023, 11:37 AM
How to add dialog service
please can you give me full solution sample code if possible please
thanks advanced for help
Rajkiran SwainPosted Apr 29, 2023, 5:48 AM
Add a button to your Blazor component:
Define a list of available columns in your component:
Define a list of visible columns that will be displayed in the grid initially:
Handle the click event of the button to show a popup or modal dialog with checkboxes to allow the user to select which columns to show or hide:
In this code, we're passing the list of all columns and the list of visible columns to a custom dialog component called
ColumnPickerDialog. TheOnCloseevent of the dialog is used to update the list of visible columns based on the user's selection.Update the RadzenGrid component to use the
_visibleColumnslist:In this code, we're iterating over the
_visibleColumnslist and rendering each column using the@columnsyntax.ColumnPickerDialogthat allows the user to select which columns to show or hide