This is a migrated thread and some comments may be shown as answers.

[Solved] Hiding and Unhiding columns in a grid

1 Answer 107 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 18 Nov 2009, 11:55 AM
Hi,
      I'm aware that there is the functionality to reorder and move columns around in a gridview, however are there functions to Hide and Unhide specific columns and show all columns.

Regards

Robert

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Nov 2009, 12:12 PM
Hello Robert,

You can access the column and set the Visible property to False in order to hide the column.

      RadGrid1.MasterTableView.GetColumn("ColumnUniqueName").Visible = false;


And try the following code for showing all columns in the grid:
        foreach (GridColumn col in RadGrid1.MasterTableView.Columns)
        {
                 col.Visible = false;
        }

Regards,
Shinu.
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or