I have a form containing a grid and a combobox: changing the combobox value should ideally change the set of columns visible in the grid. I'd like to achieve this by defining field groups on the source table, and using the dataGroup property on the grid (having set the AutoDeclaration property to yes), but this appears to have no effect at runtime: is it possible that the only works as a mutator only when creating the form from scratch?
If so, I think that means setting the AutoDeclaration property on every single column, and having the modified method on the combobox set the visible property on each control true/false appropriately for the different combobox values: I've seen this working, so I don't think I'm missing a grid redraw/refresh method because it would also need to be called after setting visibility.
Clearing the user cache hasn't changed the behaviour, so I'm pretty confident the long-winded way is the only way to achieve this, but it would have been neat to use distinct groups on the table. Guess one could separate out the fields across different tables and enable/disable the joined datasource at runtime?
*This post is locked for comments