hiding a column of datagrid: dataset chosen at run-time

M

Michelle Stone

I have several Data Adapters, and depending on certain
conditions, I set one of them as the DataSource for a
datagrid on my web form.

In each of the data adapters, I have the primary key of
the respective tables SELECTed in the select-queries, so
that I may use that field as the DataKeyField of my
datagrid.

But when I set the dataset produced from my data adapter
as the datasource, my DATAGRID also shows the primary key
as a separate column which i don't want.

How can I HIDE a column in my datagrid?

approvalGrid.Columns[0].Visible = false did NOt work
saying that such a column does not exist. Perhaps this is
because all my columns are generated automatically and
the 0th column does not physically exist.

Help... :)

Thanks....
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top