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

DataPager Fire before Grid

3 Answers 20 Views
Grid
This is a migrated thread and some comments may be shown as answers.
muhammad
Top achievements
Rank 1
muhammad asked on 28 Aug 2013, 05:22 PM
Dear all,
i have an asp.net application that uses grid view with data pager everything great except that when i filter the grid the data pager total request event run first on the server side 
that cause me a problem because i cant get the totalrowcount because the  Grid FilterExpression is null 
so the rad data pager run first then the page load event then the grid pre_render event
anyway how to make the data pager not running first

regards

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 02 Sep 2013, 02:44 PM
Hi Muhammad,

The "TotalRowCountRequest" event handler of the RadDataPager is called after "Page_Load" event handler, as it should. This could be easily observed if you debug your application with breakpoints at "Page_Load" and "RadDataPager1_TotalRowCountRequest" (for an example).

Additionally, I would recommend you have a look at "ASP.NET Page Life Cycle Overview" help article for more information on that matter.

If you continue to experience difficulties with your project, please consider elaborate a little more on the issue and provide a code snippet of your markup and code-behind.
 
Regards,
Konstantin Dikov
Telerik
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 the blog feed now.
0
muhammad
Top achievements
Rank 1
answered on 07 Sep 2013, 08:15 PM
 dear Konstantin Dikov,
i was wondering about your answer ,
its a joke or not i am telling you i will never add post here if i before testing it and tracing it on by the breakpoint , 
if you are sure of what you said and that the rad data pager is not firing before the page load 
send me an example that contains radgird , radajaxmanager , rad datapager
if you cant i can send you mine and you can trace it .
BR
0
Konstantin Dikov
Telerik team
answered on 10 Sep 2013, 11:31 AM
Hi Muhammad,

I have prepared a sample project, showing that the "Page_Load" event is firing before the "TotalRowCountRequest". I have added RadGrid and RadAjaxManager to the page, although they have no relevance to the issue in question.

Please note that RadDataPager can be used with controls, which implement the IPageableItemContainer or IRadPageableItemContainer interface (see "RadDataPager Overview" help article for reference). Such controls include the RadListView and MS ListView, however, RadGrid does not implement such interfaces.

For RadGrid paging you could look at our online demo: "RadGrid Basic paging"; or the online documentation: "RadGrid - Basic paging".

Hope that helps.

 

Regards,
Konstantin Dikov
Telerik
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 the blog feed now.
Tags
Grid
Asked by
muhammad
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
muhammad
Top achievements
Rank 1
Share this question
or