Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Preserve focus in a specific row after re-populate
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Preserve focus in a specific row after re-populate

 Post Reply Post Reply
Author
Message
braian87b View Drop Down
Groupie
Groupie


Joined: 01 April 2008
Location: Argentina
Status: Offline
Points: 35
Post Options Post Options   Thanks (0) Thanks(0)   Quote braian87b Quote  Post ReplyReply Direct Link To This Post Topic: Preserve focus in a specific row after re-populate
    Posted: 25 April 2008 at 1:43pm
i need to know the correct method to, after populate the list, set the top-row (visible at the top of the list) and the already focused, to preserve the position and the focused row/record when i perform an list update (removing all rows and re-populating the list)
 
info: i always have in the firsth Item of the record the ID of the table of the database and has to be related to the ID
note: does not matter the first visible record, but is important the focused record visible in the list (EnsureVisible Method for Example).
 
Example:
 
List:
ID             Name                LastName
10              Jonh                  Kirk    < FirstVisible Record example
11              Jonh                   Black
12              Stephan             Clark < Focused/Selected Record
13              Pedro                 Lopez
15              Alexander          Stope
 
After the Update (or a classic F5 - Refresh)
 
Updated List:
ID             Name                LastName
09              Charles             Dawn
10              Jonh                  Kirk   
12              Stephan             Clark < Focused/Selected Record
13              Pedro                 Lopez
14              Steven              Hawken
 
note: in this example the record 11 was deleted and the record with ID 14 was inserted
i want to preserve the focus in the record with ID 12
 
 
(Sorry for my Ligth English)
Please, put (if you can) a code-example/snippet
 
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 29 April 2008 at 10:11am
Hi,
 
I don't know if the versions are different with FocusedRows but in V11.2 the FocusedRow will keep the focus all the time (grayed) also when deleting records. If your version doesn't do this you have to store a reference of the selected record and if you populate again, "select" the stored record.
 
And maybe it's a good idea to upgrade your version, there are wonderfull features in version V12.0 (you have to wait a few days for the official release)
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.