Let's suppose I have a ListGrid, which shows some records from a DS.
At first, only that is shown (a few screens forward) are loaded; most of the data is loaded only on demand.
Now let's suppose I need to select a record (or a set of records) by the primary keys, but it's possible that it is not even loaded yet. How do I do that?
The desired behavior is that when selecting a record, it should be loaded, marked (visually) as selected, and the grid should scroll to it. Likewise, when selecting a set of records, load all of them (so that getSelection() can return them), and scroll to the first.
If the wanted record is loaded, I can say something like
, but then this won't work with not yet loaded records.
How do I do this?
At first, only that is shown (a few screens forward) are loaded; most of the data is loaded only on demand.
Now let's suppose I need to select a record (or a set of records) by the primary keys, but it's possible that it is not even loaded yet. How do I do that?
The desired behavior is that when selecting a record, it should be loaded, marked (visually) as selected, and the grid should scroll to it. Likewise, when selecting a set of records, load all of them (so that getSelection() can return them), and scroll to the first.
If the wanted record is loaded, I can say something like
Code:
list.selectRecord(list.getResultSet().findByKey(id));
How do I do this?
Comment