I think I understand the scenario. I was referring to the same case in my previous post. Thank you for clarifying, though. Bottom line is, we need to identify why NeedDataSource fires in the Init
phase of your control. Usually, RadGrid does not bind so early in the page life cycle. There are 2 potential reasons for that that we can suggest without knowing any further details:
1. ViewState is disabled for the control tree in which your RadGrid resides. In this scenario RadGrid needs to rebind in the Init phase, so that it has its controls structure recreated properly.
2. The container in which RadGrid is added is databound. In this case, RadGrid binds as a result of databinding command coming from a parent container.
Identifying why RadGrid binds so early in the page life cycle will help us determine what we can do to improve that. Ideally, (with ViewState enabled and RadGrid properly databinding), the grid would not databind on every postback, but only when required (e.g. page/sort/filter or any other databinding command) or as a result of an explicit call to Rebind(), which is what you are doing. In your current scenario RadGrid is rebinding twice - once on Init and once on call to Rebind. This may be excessive and we are trying to understand why.
I hope I am clearer.
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