smartgwt - ListGrid put focus in the FilterEditor -
i have listgrid defined this:
listgrid lgrid = new listgrid(); listgridfield first = new listgridfield("first",first"); listgridfield second = new listgridfield("second ",second "); lgrid.setfields(first, second); lgrid.setshowfiltereditor(true);
¿how can put keyboard focus in first filter editor field after call show() in layout?
thxs in advance.
depending on use case (which useful provide more focused answer), solution posted might not need, because if scroll on listgrid, trigger new data fetch (if there more records show), , move cursor filter editor result (if user editing records @ point, cursor moving filter row not want happen!!).
in such case, want call grid.focusinfiltereditor("fieldtofocus")
after listgrid.show() statement or in clickhandler of button use fetch data, etc.
anyway, don't need timer either. works:
listgrid.adddataarrivedhandler(new dataarrivedhandler() { @override public void ondataarrived(dataarrivedevent event) { grid.focusinfiltereditor("fieldtofocus"); } });
Comments
Post a Comment