.net - give focus to datagrid after button is clicked -


i have button , datagrid. located on same window. need give focus selected row after button clicked. seems not straightforward i've thought.

so i've got datagridrow object. call datagridrow.focus(), focus still there. after reading incredible topic i've tried using focusmanager loose focus on button, tried settings button.isfocusable = false , setting true again. tried giving focus row using this:

var scope = focusmanager.getfocusscope(mydatagrid); focusmanager.setfocusedelement(scope, row); 

but didn't help. not understand how focusmanager works enough. give me clue how give focus row?

row.focusable = true; row.focus(); 

Comments

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -