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

"RadGrid.MasterTableView.Columns.Clear();" and "RadGrid.Columns.Clear();" don't work

1 Answer 149 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jorge
Top achievements
Rank 1
Jorge asked on 14 Mar 2011, 02:33 PM
Good morning!

My version of the telerik is RadControls for ASP.NET Ajax 2010 Q3.

I'm trying to remove columns that are inserted with the command gridProntuarios.MasterTableView.Columns.Add() of grid through the command "gridProntuarios.MasterTableView.Columns.Clear();" and
"gridProntuarios.Columns.Clear();" but don't work.

What would the solution for this trouble?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 15 Mar 2011, 06:04 AM
Hello Jorge,

I guess it is not possible to delete a Grid column which is already added in the Grid's Column collection. One suggestion will be to set its Visibile/Display property to false as shown below.

C#:
gridProntuarios.MasterTableView.GetColumn("ColumnUniqueName").Visible = false;

Or
gridProntuarios.MasterTableView.GetColumn("ColumnUniqueName").Visible = false;

Thanks,
Princy.
Tags
Grid
Asked by
Jorge
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or