nixnixnix Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
Senior Member
Hi,
It would be good to have a GridCtrl function which completely reset the control (not necessarily the settings but certainly the columns and data). When I add a bunch of columns and then Reset and add them again then the display gets messed up. I've also tried GridCtrl::Clear(true) and that doesn't appear to work either.
Basically I want to be able to add a bunch of columns and data and then update the data and do it all again.
It would be good to have a GridCtrl function which completely reset the control (not necessarily the settings but certainly the columns and data). When I add a bunch of columns and then Reset and add them again then the display gets messed up. I've also tried GridCtrl::Clear(true) and that doesn't appear to work either.
Basically I want to be able to add a bunch of columns and data and then update the data and do it all again.
Nick
Hello nixnixnix
I use usually Clear(true) and it cleans data and columns.
unodgs Messages: 1366 Registered: November 2005 Location: Poland
Ultimate Contributor
Reset works fine. I wrote about this column problem many times here (this means I have to redesign it as it's not intuitive ).
Just put all your AddColumns between following method calls:
This display mess happens only in proportional mode and only if grid is visible on the screen. It is so because each AddColumn recalculates columns proportions being not aware of next AddColumn calls. I'll put this issue on my todo list.