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

Hide Expand/Collapse Column

2 Answers 175 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kerry
Top achievements
Rank 1
Kerry asked on 09 Feb 2009, 04:01 PM
Hi,  I am trying to hide the Expand/Collapse column at runtime.  I have a Radgrid setup with grouping by category, but I want to hide this column.

I tried RadGrid1.MasterTableView.ExpandCollapseColumn.Visible = false; using OnColumnCreated, but it doesn't seem to do anything.

Any help would be appreciated.

Thanks.

2 Answers, 1 is accepted

Sort by
0
Kerry
Top achievements
Rank 1
answered on 09 Feb 2009, 04:18 PM
I got it.  In case anyone else needs it, it is the OnColumnCreated event.

Here is the code
protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e)  
    {  
        if (e.Column is GridGroupSplitterColumn)  
        {  
            e.Column.Visible = false;  
        }  
    } 
0
Shinu
Top achievements
Rank 2
answered on 10 Feb 2009, 05:20 AM
Hi,

You can also refer the following help article which explains the same scenario.
Preventing groups expansion by hiding the expand/collapse images

Shinu
Tags
Grid
Asked by
Kerry
Top achievements
Rank 1
Answers by
Kerry
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Share this question
or