Do not want to show prim key column in data grid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using the data adapter config wizard and am setting up a query. I do not want the primary key field displaye
on the data grid, but when I do not select it I get the error (query does not include primary key). Thanks.
 
To use any of the autogenerators (the Configuration wizard or the
CommandBuilder) you need to have a key. If your sole purpose is to avoid it
showing in a grid, apply a DataGridTableStyle and then, on the
DataGridColumnStyle, set the .Width property of hte PK Column to 0. For all
intents and purposes, it's no longer there. Won't mess with the
functionality at all.

HTH,

Bill
Paul said:
I am using the data adapter config wizard and am setting up a query. I do
not want the primary key field displayed
on the data grid, but when I do not select it I get the error (query does
not include primary key). 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

Back
Top