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

reset paging after node loses focus

1 Answer 70 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Glen
Top achievements
Rank 1
Glen asked on 05 Mar 2012, 03:15 PM
I'm relatively new to using the RadGrid, but I'm sure there's a way to do what I'm trying to do--I just don't know where to start.
I've got a 3-level hierarchical grid.  In any of the levels, if there is paging taking place I need to reset the page anytime that node loses focus.  In other words, if a user starts working in one node but switches to another (whether already expanded or not), I need to reset the page to page 1 for the node that lost focus.
I didn't see any obvious examples of this, or at least nothing that deals with the complexity of managing 3 levels.  Any advice would be greatly appreciated.

Thanks,

Glen MacAfee

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 08 Mar 2012, 12:15 PM
Hello,

By default if you are using server binding you need to perform a postback to the server in order to change the current page index. What exactly do you mean by loosing focus? If it is the client focus then the desired behavior could not be achieved with server binding.

If you want to execute your logic when the user clicks Expand/Collapse button you could hook the ItemCommand event of RadGrid. And in its body you should check whether the fired command is ExpandCollapse command and if it is, you need to change the current page index to zero. You should define when this logic will be executed, because otherwise you won't be able to go to different page.

Consider these suggestions and then if it possible provide further information about your project, so all the people who want to help you to have better understanding of your project.

Kind regards,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Glen
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or