I have a DataGridView that I've setup in a WinForms project. The Columns are all defined in the designer file. When I go to run my SQL the columns in the DataGridView get replaced with the columns names in the query.
How do I keep the columns as defined by the DataGridView, and just add the rows from the dataset from the dataset to the GridView.
//Columns as they appear in the DataGridView
Name | Address | City | State | Zip | Account Num |
//Populate the gridView
DataSet ds = Account.search(strSearch);
accountGrid.DataSource = ds.Tables[0];
//query
string sql = "SELECT distinct acctNum, name, address, city, state, zip from accounts";
return DataService.GetDataSet(sql);
//The End Result of the columns
acctNum | name | address |city | state | zip