In the Opening event of my web page (QueryPage) I have the code:
ResultsList.DataSource = new TableDataSource
I believe this code will execute TableDataSource.ColumnData which will put the column headings on the ResultsList (aka WebListBox). This will be fine if I want to run single query returning list of values from columns ex: “a, b, c”.
However, I need to be able to run multiple queries on this QueryPage that will return various values.
Example:
Query 1 will return “a, b, c” while Query 2 will return “x,y”
Since I need to re-use the ResultsList control I need to change column headings on it to match the data set returned by selected query (either “a, b, c” or “x, y”).
I think TableDataSource.ColumnData method is called only once when instantiating (Opening event) the ResultsList control. How can I change the layout of the ResultsList when running selected query?
1 post - 1 participant