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

Problem filter by column in RadGrid with NeedDataSource use custom pagin

1 Answer 159 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Henry John
Top achievements
Rank 1
Henry John asked on 03 Jun 2011, 11:41 AM
When i enable AllowFilterByColumn in RadGrid and custom paging with NeedDataSource.  I have a problem which is filter is ok but paging of RadGrid is show wrong. If i dont use AllowFilterByColumn Paging is ok. But when i use AllowFilterByColumn Paging will show wrong Please help me. Thanks. This is my code : 
 
protected void RgProductNeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{           
int startRowIndex = rgProduct.CurrentPageIndex * rgProduct.PageSize;        
        
int totalRows;            
        int maximumRows = rgProduct.PageSize;          
        var pageIndex = startRowIndex / maximumRows;          
        rgProduct.DataSource = _datacontext.Products.Page(pageIndex, maximumRows, p => p.ProductCode,
true, out totalRows);

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 08 Jun 2011, 12:46 PM
Hi Henry,

Please go through the forum thread below, which elaborates on this matter and let me know if it helps to achieve the desired functionality:
http://www.telerik.com/community/forums/aspnet-ajax/grid/filtering-with-customized-paging.aspx

Best wishes,
Pavlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
Grid
Asked by
Henry John
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or