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

hideColumn gives error.

3 Answers 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sneha
Top achievements
Rank 1
Sneha asked on 24 Jul 2010, 12:51 PM
Microsoft JScript runtime error: 'this.get_columns()[...]' is null or not an object is the error if I try to hide a column and then bind the grid,

The binding is on the clientside.

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 26 Jul 2010, 01:29 PM
Hello Sneha,

You can try the following code snippet in PreRender event to hide the columns and then Rebind the grid:

protected void gvCktMap_PreRender(object sender, EventArgs e)  
   {  
       gvCktMap.MasterTableView.GetColumn("sid").Visible = false;   
       gvCktMap.MasterTableView.GetColumn("customername").Visible = false;  
       gvCktMap.MasterTableView.GetColumn("marketname").Visible = false;  
       gvCktMap.Rebind();  
   }  


All the best,
Maria Ilieva
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
Sneha
Top achievements
Rank 1
answered on 26 Jul 2010, 01:34 PM
Hi Maria,

Thanks!
Acutally I was looking for a solution that I can do in javascript writing serverside code is the last thing I'd have to do
0
Maria Ilieva
Telerik team
answered on 27 Jul 2010, 04:31 PM
Hi Sneha,
 
Please refer to Hide/show columns using client-side approach:
Client-side API

Regards,
Maria Ilieva
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
Tags
Grid
Asked by
Sneha
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Sneha
Top achievements
Rank 1
Share this question
or