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

paging problem

5 Answers 58 Views
Grid
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 12 Mar 2009, 06:42 AM
Hi,

I'm using default paging for RadGrid.The problem is that clicking on the next page button doesn't display the next set of records.I tried binding pageindexchanged event but that doesn't get called either.


regards,
john.

5 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Mar 2009, 09:06 AM
Hi John,

For implementing Paging in Grid you just need to set the AllowPaging property to true and set the PageSize to a suitable value. Can you confirm that you are binding the Grid using AdvanceDataBinding techniques.

Thanks
Shinu
0
john
Top achievements
Rank 1
answered on 12 Mar 2009, 10:35 AM
Hi Shinu,

I have set both these properties and for data binding I'm using LINQ to Sql method

i.e.

RadGrid1.DataSource = db.Data_ReadAll();

RadGrid1.DataBind();

0
Princy
Top achievements
Rank 2
answered on 13 Mar 2009, 04:56 AM
Hello John,

Try setting the DataSource for the grid in the NeedDataSource event of the grid as shown below and see if it helps:
cs:
protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e) 
    {       
        RadGrid1.DataSource = db.Data_ReadAll();          
    } 

Thanks
Princy.
0
john
Top achievements
Rank 1
answered on 13 Mar 2009, 06:01 AM
Hi Princy,

I tried setting the NeedDataSource but its not getting fired.



0
Shinu
Top achievements
Rank 2
answered on 13 Mar 2009, 08:21 AM
Hi John,

Have you set the Event handler for the NeedDataSource event in the aspx or code behind? It would be better if you could send the code behind and aspx code.

Shinu
Tags
Grid
Asked by
john
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
john
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or