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

Set focus on expanded row

2 Answers 131 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Hassan
Top achievements
Rank 1
Hassan asked on 15 Feb 2011, 03:10 PM
I have a RadGrid on a page that uses Sorting/Filtering, Virtual Scrolling, and also hierarchy with 3 tables being loaded on expand. Everything works well except when I scroll towards the bottom of the grid and do an expand/collapse the focus jumps to the top row each time. Is there a reason for this and how do I fix it?

Also once I added hierarchy functionality my dropdown column no longer looks like a dropdown but like a test box though it still functions like a dropdown. I don't know if this is because of something I did or is just something that happens when you add the expand/collapse functionality. Any help would be appreciated.

Thanks

2 Answers, 1 is accepted

Sort by
0
Hassan
Top achievements
Rank 1
answered on 15 Feb 2011, 07:54 PM
Disregard the second part to the question. I figured it out but I am still having trouble with the focus after expanding the row. I have an AJAX Manager on the page set to update the grid upon expansion.
0
Maria Ilieva
Telerik team
answered on 18 Feb 2011, 10:29 AM
Hi Hassan,

I would suggest you to use the

RadAjaxManager1.FocusControl(RadGrid1.ClientID)

For example:

If e.CommandName = "ExpandSelected" Then     
       
            If IsNumeric(e.CommandArgument) Then     
                Dim otv As GridTableView = CType(e.Item.OwnerTableView, GridTableView)      
       
                otv.Items(CInt(e.CommandArgument)).Expanded = True     
                RadAjaxManager1.FocusControl(RadGrid1.ClientID)   
    
            End If     
       
        End If     



Kind regards,
Maria Ilieva
the Telerik team
Tags
Grid
Asked by
Hassan
Top achievements
Rank 1
Answers by
Hassan
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or