Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl: how to show the last inserted row
|
|
| Re: GridCtrl: how to show the last inserted row [message #35199 is a reply to message #35197] |
Sat, 21 January 2012 22:30   |
|
|
| forlano wrote on Sat, 21 January 2012 13:19 | Hello,
I have a GridCtrl populated by many data. Each time I feed a record at the end of the ctrl I would like to visualize it.
I tried
grid.GoEnd()
but the lelection go on the last row but no autoscroll is performed and the row remains not visible.
Even grid.ShowRow(lastrow) does not work.
Which is the magic method that let appear the last added row at the end of the grid?
Thanks,
Luigi
|
That's strange. GoEnd is supposed to scroll the content of the grid. I'll check what's going on.
|
|
|
|
|
|
|
|
|
|
|
|
| Re: GridCtrl: how to show the last inserted row [message #35300 is a reply to message #35292] |
Mon, 30 January 2012 12:02   |
|
|
Ok, now I see what the problem is. You're going end before application window is open. The grid was optimized to recalculate everything only when it's absolutely needed and only if the grid is visible. That however causes few problems including that one you ran into. But I think that GoEnd (and family) should work in every context - so it's fixed now. I'll commit the changes when I get back home. And you were right about some uninitialized variable - it was part of the problem.
I think grid needs rewriting (too many interferences in the code) but I'm reluctant to do it (developing current version took me few years . But I guess this day is coming
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sun Sep 27 17:04:57 GMT+2 2026
Total time taken to generate the page: 0.01925 seconds
|