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

Gridview ChildTemplate formating

1 Answer 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dipak
Top achievements
Rank 1
Dipak asked on 23 Oct 2008, 01:50 PM
I want to hide columns in child grid view which is in bound mode and want to keep when I reassign new datasource to grid(Master and Child). Where do I write a code for that?

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Vasilev
Telerik team
answered on 27 Oct 2008, 11:06 AM
Hi Dipak,

Thank you for writing.

To hide a column in RadGridView you simply have to set the column's IsVisible property to false. Please review the code-block below:
 
this.radGridView1.MasterGridViewTemplate.Columns[0].IsVisible = false
this.radGridView1.MasterGridViewTemplate.ChildGridViewTemplates[0].Columns[0].IsVisible = false

For example you could use this code in Form Load event or after set grid's DataSource.

If you have additional questions, do not hesitate to contact me again.

Kind regards,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
Dipak
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Share this question
or