[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
FIXGRID row not highlighted.  XML
Forum Index -> Development
Author Message
vadingding

Power User
[Avatar]

Joined: 14/07/2017 13:26:37
Messages: 145
Offline

Hi Captain,

What i want to do is, when i refresh the list. I want to keep the previously selected row highlighted. But it does'nt work.

This is how i refresh.
Code:
 m_rowBind.getItems().clear();
 


This is how i re highlight the row.
Code:
 if (currentRecord != null){
                 m_rowBind.selectAndFocusItem(currentRecord);
             }
 


Note : currentRecord == previously selected row.

CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi,

are you sure that "currentRecord" is the same?
Seems to me that you
0. store currentRecord
1. clear() the grid
2. then getItems().add() new items
3. and then apply selectItem(currentRecord)

So the currentRecord instance was re-new-ed during 2.

?

Regards, Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team