Thanks. Works good. Seems when I tried to do this, I was not changing the focusedRow, I was only changing the selectedIndex.
Another question. If I have a sort applied on the listgrid, and my selectedRow jumps to another page (using BB pager on a datasource that is a localrecord), how can I:
1) determine the page it is on, then
2) jump to that page
Select Row of Listgrid
25 March, 2008 - 18:05 — andysHi tordona,
There is a possibility to highlights specific row of listgrid when you click a button.
The steps:
1. set the 'selectedIndex' attribute of listGrid
2. set the 'focusedRow' property of listGrid
3. FireEvent 'focus'
so below I give the snippet code
...
</b:listGrid>
<button>focus row 1
<e:handler event="click" type="application/javascript">
var listgrid = bb.document.getElementById("listgrid");
var selectedIndexes = listgrid.getAttribute("selectedIndexes");
listgrid.setAttribute("selectedIndexes", "1");
listgrid.setProperty("focusedRow", 1);
bb.command.fireEvent(listgrid, "focus", false, false);
</e:handler>
</button>
It will then select the row 1.
Hope this helps
:)
Thanks. Works good. Seems
25 March, 2008 - 21:06 — tordonaThanks. Works good. Seems when I tried to do this, I was not changing the focusedRow, I was only changing the selectedIndex.
Another question. If I have a sort applied on the listgrid, and my selectedRow jumps to another page (using BB pager on a datasource that is a localrecord), how can I:
1) determine the page it is on, then
2) jump to that page