I am enamored over the visual designer's capability in VS2005 to create all
the controls and customized code to fill and display a DataGridView just by
dragging a data source onto the designer surface and then specifying a SQL
query in the wizard. What I would like to know is how to do this
programmatically?
Specifically, I have a set of arbitrary SQL queries. I want to build a
Windows Form that allows the user to select one of these queries and for the
program then to create a new DataGridView on the current form, where the
columns and datatypes are derived from the results of the query (just as the
visual designer does). How would one approach this task...?