|
Subject:
|
return to a row msflexgrid
|
|
Posted By:
|
Jabber
|
Post Date:
|
1/20/2006 5:18:12 AM
|
Hi everyone, I'm new to this forum and I have this problem in VB. I'm using a lot of MSFlexgrid in my programming, and I don't know how to figure this out:
I have a form whit A Flexgrid on, which is filled with a lot of data. It works fine, and I offer my users the possibility to click on a row and after they have done this they get a new form. In that form the data of the selected row in the flexgrid is displayed (and many other things). My problem is : Is there a way that the focus in the flexgrid is set back to the previous selected row when the users closes the second form and returns to the first form. This way they don't have to search again and scroll down the whole flexgrid again. Sometimes my grid gets populated with 18000 lines! For example if I want to see the details of row 11500 I scroll down and when I return the focus is back to the top. I hope this is clear to everyone. Can somebody help me?
Ron
|
|
Reply By:
|
marcostraf
|
Reply Date:
|
1/20/2006 2:00:16 PM
|
why does the grid scroll when you return to the first form? It should not do it unless you repopulate it. Anyway, use the TopRow property to scroll back:
dim ltop as long ltop = grid.toprow ''' display the second form here grid.toprow = ltop
Marco
|
|
Reply By:
|
Jabber
|
Reply Date:
|
1/23/2006 5:46:35 AM
|
Marco, Thanks man my problem is solved. If I had known it was that simple.... Yes I repopulate the form everytime... that was my problem.
|