This is a migrated thread and some comments may be shown as answers.

Child control Focus

1 Answer 8 Views
GridView
This is a migrated thread and some comments may be shown as answers.
anil indorkar
Top achievements
Rank 1
anil indorkar asked on 10 Dec 2011, 04:32 PM
Hi ,

I am using telerik grids in my silverlight applicvation with mvvm architecture. In the grid we are loading griddetails with multiple text boxes inside the stackpanel. I need to set focus on the first text box when user click on grid row. I have used stackpanel_loaded even to set the focus, but this event is getting called only first time when we click on row and if we again click on the same row. This event is not getting called. I tried to set the focus on row_click event, but i am unable to find text box and stackpanel on row click event.

Please let me know your comment on this.

Thanks

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 12 Dec 2011, 07:30 AM
Hello Anil Indorkar,

You can try to handle RowDetailsVisibilityChanged event of the grid. It will give you information whether the details are visible/collapsed, the corresponding row and the details element - this should be your StackPanel. Once you get the details element, you can find the first TextBox (through ChildrenOfType<T> extension method) and set the focus to it.
 

Best wishes,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
anil indorkar
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or