I have a GridDataBoundGrid that is bound to a .mdb using a DataAdapter and DataSet. When I first start the program the grid is filled with data properly.
I then change the select command and refill the DataSet. The change to the query is to remove one column that is returned. For example:
SELECT a, b, c, d FROM x
SELECT a, b, c FROM x
The proper rows are displayed but I still get a column labeled d. The column d has empty data.
How to I get the grid to stop displaying column d, short of manually removing the column. There will be instances where the query is typed in by the user and can be sonewhat freeform.
ADAdministrator Syncfusion Team September 24, 2004 10:25 AM
I think calling Binder.ResetHierarchyLevels() should do it, but check out also that thread:
SDSteven DomingueSeptember 24, 2004 12:43 PM
Nope. That didn''t work.
After looking to it better I found that I had to:
a) make a NEW OleDbDataAdapter with the new command string,
b) clear the dataset,
c) fill the dataset from the new adapter with a new table name,
d) set the datamember of the grid to the new table.
The grid would then refresh properly