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

Hide column using databinding

1 Answer 81 Views
GridView
This is a migrated thread and some comments may be shown as answers.
AMF
Top achievements
Rank 2
AMF asked on 01 Oct 2012, 09:27 AM
Hi all,

I would like to hide a column in the radgridview after I set the datasource property to a DataTable. But the problem is, that the column count is always 0. I'm using the AutoGenerateColumns = true  to create all my columns.



1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan
Telerik team
answered on 04 Oct 2012, 06:41 AM
Hello,

Thank you for writing.

You can use the DataBindingComplete event of RadGridView to manipulate with the columns. This way you can be sure that they will exist when you attempt to access them.

I hope this helps.

All the best,
Stefan
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
AMF
Top achievements
Rank 2
Answers by
Stefan
Telerik team
Share this question
or