Hi folks,
I'm looking desperately for a solution for the following wxGrid problem: when I create a grid for let's say 1400 lines (via CreateGrid()), destroy it (via ClearGrid()) and then want to display another query set (for let's say 3200 entries), the Grid stops at 1400 lines. ClearGrid seems not to really wipe the lines. The Grid is not derived (so I have not derived a table either). Any suggestions ? Any help would be appreciated...
YAGQ - Yet another Grid Question Topic is solved
-
- Knows some wx things
- Posts: 43
- Joined: Wed Jan 16, 2008 9:06 am
- Location: Cape Town, SA
-
- wxWorld Domination!
- Posts: 1471
- Joined: Tue Nov 14, 2006 7:58 am
- Location: Saint-Petersburg, Russia
Re: YAGQ - Yet another Grid Question
Hi,
And use BeginBatch()/EndBatch() to reduce screen flicker.
try this to clear all rows:homerjaysimpson wrote:Hi folks,
I'm looking desperately for a solution for the following wxGrid problem: when I create a grid for let's say 1400 lines (via CreateGrid()), destroy it (via ClearGrid()) and then want to display another query set (for let's say 3200 entries), the Grid stops at 1400 lines. ClearGrid seems not to really wipe the lines. The Grid is not derived (so I have not derived a table either). Any suggestions ? Any help would be appreciated...
Code: Select all
grid->DeleteRows(0, grid->GetNumberRows());
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
-
- Knows some wx things
- Posts: 43
- Joined: Wed Jan 16, 2008 9:06 am
- Location: Cape Town, SA
-
- wxWorld Domination!
- Posts: 1471
- Joined: Tue Nov 14, 2006 7:58 am
- Location: Saint-Petersburg, Russia
Well, why do you call CreateGrid() another time? You don't have to do it after DeleteRows(...), just add some others rows.homerjaysimpson wrote:Thank you very much, now the rows are deleted correctly but when I then call CreateGrid() another time, no other row is added. What am I doing wrong here ?
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10
-
- Knows some wx things
- Posts: 43
- Joined: Wed Jan 16, 2008 9:06 am
- Location: Cape Town, SA
Solved
Thank you very much, that did the trick. So I can only call CreateGrid exactly one time then ? What's that for ?