I am using VB .NET (2003) for a project that includes a datagrid on one form that allows the user to switch to details on a second form. The datagrid was built in design mode with all the proper style information.
The user types in a part of a company name and a database search returns matching data (via ADO) to a dataset. If more than 1 matching company was found, the datagrid is made visible and has its source and member assigned to the table in the dataset. All appears fine. The user clicks on one item in the grid and the program senses the item, locates the company in the database, retrieves detailed data and displays on the secondary form. The user can then return to the first form and select a different item on the grid to follow a path.
If the user does not want anything in the current grid, they START OVER and enter a new search string. My program retrieves new data into the DataSet however the grid appears to "remember" items that were selected during a prior use. Their retained text values appear in the new grid in place of data in the actual underlying dataset.
How do I tell the data grid to forget it was ever used before and start fresh with no current cell or remembered selections?
The user types in a part of a company name and a database search returns matching data (via ADO) to a dataset. If more than 1 matching company was found, the datagrid is made visible and has its source and member assigned to the table in the dataset. All appears fine. The user clicks on one item in the grid and the program senses the item, locates the company in the database, retrieves detailed data and displays on the secondary form. The user can then return to the first form and select a different item on the grid to follow a path.
If the user does not want anything in the current grid, they START OVER and enter a new search string. My program retrieves new data into the DataSet however the grid appears to "remember" items that were selected during a prior use. Their retained text values appear in the new grid in place of data in the actual underlying dataset.
How do I tell the data grid to forget it was ever used before and start fresh with no current cell or remembered selections?
Comment