I have a grid that displays different tables. The problem I have is that the column count in the tables is different so if I for instance display a table with 5 columns then try to display a table with 8 columns only 5 columns out of the eight are displayed. I tried using grid.clear this will display the right amount of columns but then I lose all the formatting (column headers etc). What is the correct method to re-initialize a grid to display different tables.
Imported from legacy forums. Posted by Nick (had 2826 views)
A possible solution might be to use 1 grid control for each table, and just show 1 of the grid controls. When you want to display a different table, just make the current grid invisible, and make the new grid visible.
Imported from legacy forums. Posted by Tommy (had 220 views)
Just a followup for the group. After talking to technical support they told me that if you set the datasource and datamember seperately this creates an invisible column which is not cleared, this is what was screwing me up. The correct way to do it is to use the setdatabindings method this does not create the extra column and all colums are cleared using the grid.coulmns.clear method. I tried this and it works.
Imported from legacy forums. Posted by Nick (had 327 views)