DataTable, TableAdapter and GridView

Joined
Jun 27, 2006
Messages
1
Reaction score
0
I have a DataTable that has 12 columns (or fields) in the select statement. One of the adapters has a method where the SQL only returns 2 columns rather than the 12 selected in the DataTable.

However, when I bind to the Gridview, I see all the column headers rather than the 2 the method is supposed to return.

Code:
TVG_NewsTableAdapter newsAdapter = new TVG_NewsTableAdapter();
NewsList.DataSource = newsAdapter.GetAdminNewsList();
NewsList.DataBind();

Sort of puzzled here...
 

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

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top