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

Clearing all columns from RadGridView with a GridViewSelectColumn

2 Answers 60 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 26 Jul 2010, 09:14 PM

What is the best practice for clearing columns from a RadGridView that contains a GridViewSelectColumn?  Currently, dgrid.Columns.Clear() crashes with a NullReferenceException.

 


 

public MainPage()
  {
      InitializeComponent();
      Loaded += new RoutedEventHandler(Page_Loaded);
  }
  void Page_Loaded(object sender, RoutedEventArgs e)
  {
      GridViewSelectColumn dgsc = new GridViewSelectColumn();
      dgrid.Columns.Add(dgsc);
  }
  private void Test_Click(object sender, RoutedEventArgs e)
  {
      dgrid.Columns.Clear();
  }

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 27 Jul 2010, 06:24 AM
Hi Peter,

 Can you verify if you have our latest version (2010.2 714)?

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Peter
Top achievements
Rank 1
answered on 27 Jul 2010, 09:11 PM
I downloaded the latest version and this is indeed fixed.  Thanks for the quick response!
Tags
GridView
Asked by
Peter
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Peter
Top achievements
Rank 1
Share this question
or