We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Hide column base on user

I want to make a function that can hide a column that the user chooses. for example, they are 3 columns and the user just wants to hide the first or the second column how can I do that?


1 Reply 1 reply marked as answer

TP Tamilarasan Paranthaman Syncfusion Team July 26, 2023 02:00 PM UTC

Hi Agmy croft,

To achieve your requirement of hiding columns in the view, you can utilize the GridColumn.visible property. By setting GridColumn.visible to false, you can hide specific columns in the data grid. Attached to this response is a simple sample for your reference, where we have three columns, and the second column is hidden by setting GridColumn.visible to false for that column.


Furthermore, we have already provided comprehensive documentation that explains how to hide columns in the data grid. To gain further insights, we kindly request you to review the provided documentation.


UG Document: https://help.syncfusion.com/flutter/datagrid/column-types#hiding-a-column


We hope this helps. If you need any additional assistance or have any further questions, please don't hesitate to reach out. We're here to help!


Regards,

Tamilarasan


Attachment: sample_2423ba70.zip

Marked as answer
Loader.
Live Chat Icon For mobile
Up arrow icon