Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl: how to show the last inserted row
GridCtrl: how to show the last inserted row [message #35197] Sat, 21 January 2012 19:19 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
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
Re: GridCtrl: how to show the last inserted row [message #35199 is a reply to message #35197] Sat, 21 January 2012 22:30 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

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 #35287 is a reply to message #35199] Sat, 28 January 2012 19:37 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Sat, 21 January 2012 22:30


That's strange. GoEnd is supposed to scroll the content of the grid. I'll check what's going on.


No news, good news? Rolling Eyes
Smile
Re: GridCtrl: how to show the last inserted row [message #35288 is a reply to message #35287] Sat, 28 January 2012 20:13 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Sorry for not responding.. I checked this and "it works on my computer" Smile Could you please give me simplest possible test case? Thank you in advance.
Re: GridCtrl: how to show the last inserted row [message #35290 is a reply to message #35288] Sun, 29 January 2012 08:35 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Sat, 28 January 2012 20:13

Sorry for not responding.. I checked this and "it works on my computer" Smile Could you please give me simplest possible test case? Thank you in advance.


Thank you, I'll try to prepare asap the test case (a grid with more data than that it can show at once).
Just now I have noticed that instead grid.GoBegin() works. Moreover, grid.GoEnd() called just after grid.GoBegin() works! Shocked

Perhaps it is matter of some initialized parameter. I am using TDM-GCC and U++ 4295.

Thanks,
Luigi
Re: GridCtrl: how to show the last inserted row [message #35292 is a reply to message #35288] Sun, 29 January 2012 11:47 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Sat, 28 January 2012 20:13

Sorry for not responding.. I checked this and "it works on my computer" Smile Could you please give me simplest possible test case? Thank you in advance.


Here is a simply test case. On my computer (TDM-GCC and U++ 4295) after GoEnd() the cursor move but no autoscroll is performed.
Thanks a lot,
Luigi
Re: GridCtrl: how to show the last inserted row [message #35300 is a reply to message #35292] Mon, 30 January 2012 12:02 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

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 Smile. But I guess this day is coming Smile
Re: GridCtrl: how to show the last inserted row [message #35309 is a reply to message #35300] Mon, 30 January 2012 15:26 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on 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 Smile. But I guess this day is coming Smile


The problem in my app was present even when the window was already openend.
Thanks a lot.
Luigi
Re: GridCtrl: how to show the last inserted row [message #35443 is a reply to message #35309] Wed, 15 February 2012 13:26 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hi Daniel,

Is the fix online?

Thank you,
Luigi
Re: GridCtrl: how to show the last inserted row [message #35444 is a reply to message #35443] Wed, 15 February 2012 13:38 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Yes - still have problems?
Re: GridCtrl: how to show the last inserted row [message #35445 is a reply to message #35444] Wed, 15 February 2012 17:05 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Wed, 15 February 2012 13:38

Yes - still have problems?


No problem, just I have not yet downloaded the new version. I will do it asap.

Thanks,
Luigi
Re: GridCtrl: how to show the last inserted row [message #35465 is a reply to message #35444] Mon, 20 February 2012 14:09 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Wed, 15 February 2012 13:38

Yes - still have problems?


Hi Daniel,

with new version, 4603 and tdd-gcc, the test case works, but my program refuse to work Confused .
But if I use
	tab1.arr.GoBegin();
	tab1.arr.GoEnd();

then GoEnd() works Surprised
It seems there is something in GoBegin that set properly a variable that is necessary for GoEnd to work properly. Unfortunatly I cannot see this in the source code.

Thanks,
Luigi
Re: GridCtrl: how to show the last inserted row [message #35466 is a reply to message #35465] Mon, 20 February 2012 15:05 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Luigi could you modify the test case to show that GoEnd still is not working as expected?
Re: GridCtrl: how to show the last inserted row [message #35468 is a reply to message #35466] Mon, 20 February 2012 20:48 Go to previous message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
unodgs wrote on Mon, 20 February 2012 15:05

Luigi could you modify the test case to show that GoEnd still is not working as expected?


I am trying but it does not show any problem Smile
It seems the problem is only in my app Rolling Eyes
I'll try again and let you know.

Thanks,
Luigi
Previous Topic: GridCtrl: Setting column widths programmatically
Next Topic: Customising GridCtrl Search
Goto Forum:
  


Current Time: Thu Mar 28 18:37:56 CET 2024

Total time taken to generate the page: 0.01507 seconds