DataGridView: show not all columns of DataSource

D

DraguVaso

Hi,

I'm trying to use tha DataGridView of .NET 2. But it doesn't seem to have
something like a tablestyle, permitting you to show only some columns of the
DataSource andn ot all of them.

Does anybody knows how to do this? I want for exemple not that the ID of my
records are shown in the DataGridView etc.

Thanks a lot in advance,

Pieter
 
C

Cor Ligthert [MVP]

Pieter,

Did you already right click on it and look at the properties?

Cor
 
D

DraguVaso

Hehe yes :) I knwo you can add Columns and set them to visible. But these
are unbound columns!
But what I have is: During the load of the form I get a DataTable, and I
want to take that DataTable as the DataSource of my DataGridVeiw, but only
show some of the columns.

If I use the "Add Column..." it adds this columns, but they stay empty, and
all the other Columns of my DataTable are also added...
 
D

DraguVaso

Well ok, this is weird... I removed the DataGridView, and redid everything,
and now it works fine... :-/
I guess it has something to do with the Beta 2...
 

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