:: Forum >>

Setting the selected row in a list

I am usinglist.setSelectedItems([])to set which row is selected in a list. It seems to be working fine, but it is leaving a grey row where ever the selected row originally was.

For example, my list contains 5 rows. If I select row 5 it becomes blue. Then programaticly with the above code I select row 4. Now row 4 becomes blue, but row 5 is now grey. If I then select row 3, row 3 becomes blue and 5 is still grey.

Anybody know what I'm missing?

Aaron Todd
Friday, October 19, 2007
try with list.refresh()
and then set the selected row

just an idea
Markus Schostok, Germany
Friday, October 19, 2007
I am actually doing a refresh right before I select the row. Trying after as well did nothing.
Aaron Todd
Friday, October 19, 2007
You should set both selectedItems and currentItem (which might be different in case of multi-select model). -

Alex (ActiveWidgets)
Friday, October 19, 2007

Thats exactly what I needed, however for my implementation I had to set the currentItem before the SelectedItems.
Aaron Todd
Friday, October 19, 2007

This topic is archived.

Back to support forum

Forum search