I am having a lot of problems trying to reinitialise the datagrid when the datasource has changed.
For example, I have a component that creates the dataset on 1 tab, and the DevX grid on the other.
It works fine the first time it is used, but I want to be able to change the query and subsequent dataset and completely rejig the grid accordingly. I thought this would be simple but it is proving to be difficult. Please prove me wrong.
As an example is say I have a query that outputs 2 rows of data:
Select TEST.NAME, TEST.DESCRIPTION, TEST.OCCUPATION
Then I go back and change the query to:
Select TEST.NAME, TEST.DESCRIPTION
and reset the datasource, the occupation column is still present on the grid, with no data.
I am setting the grid's datasource in this way:
dvxDataGrid.DataSource = dataset.Tables("QueryResult")
I have tried everything I can think off from:
dvxDataGrid.DataSource = Nothing before reset
.etc. etc. in a variety of configurations with no luck...
Any help would be much appreciated? Do I need to build a completely new view?
Plans for a Chicken Coop