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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -