G
Grant
I have the following code that binds a datatable to my datasource. Problem
is, the table has about 25 columns and I only really want to see 5 of those
columns. I know I can do it by changing my initial SQL query but that means
if I want to use other data later on I have to make another connection to
SQL and get the additional data.
Is there a way to only bind to certain columns in my table? It is a
webcontrol datagrid.
AllResultsDataGrid.DataSource = mySqlConnection.datasetHardware;
AllResultsDataGrid.DataMember = mySqlConnection.hardwareTableName;
AllResultsDataGrid.DataBind();
Thanks,
Grant
is, the table has about 25 columns and I only really want to see 5 of those
columns. I know I can do it by changing my initial SQL query but that means
if I want to use other data later on I have to make another connection to
SQL and get the additional data.
Is there a way to only bind to certain columns in my table? It is a
webcontrol datagrid.
AllResultsDataGrid.DataSource = mySqlConnection.datasetHardware;
AllResultsDataGrid.DataMember = mySqlConnection.hardwareTableName;
AllResultsDataGrid.DataBind();
Thanks,
Grant