![]()  | 
 
Preserve focus in a specific row after re-populate | 
 
    Post Reply  
   | 
  
| Author | |
   
   braian87b  
   
   Groupie  
   Joined: 01 April 2008 Location: Argentina Status: Offline Points: 35  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     Topic: Preserve focus in a specific row after re-populatePosted: 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 
 | 
 |
![]()  | 
 |
   
   Aaron  
   
   Senior Member  
   Joined: 29 January 2008 Status: Offline Points: 2192  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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) 
 | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |