How do I create an invisible column in the DataGrid

H

Harry Keck

This seems like it should be really easy, but I can not
figure out how to do this. I am binding a DataGrid to a
DataTable. However, I do not want to display all of the
columns from the Datatable in the Grid. Without removing
the unwanted columns from the datatable, how do I make
certain columns hidden? Thanks.
 
M

Marc Scheuner [MVP ADSI]

This seems like it should be really easy, but I can not
figure out how to do this. I am binding a DataGrid to a
DataTable. However, I do not want to display all of the
columns from the Datatable in the Grid. Without removing
the unwanted columns from the datatable, how do I make
certain columns hidden?

You cannot - period. It's another one of these cases where I think the
designers didn't really think things through to the end - if you don't
want to display a column, you have to actually remove the column from
the collection of columns for the grid (which makes it really painful
if you try to easily show / hide certain columns.....)

Marc

================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top