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

Can't change pages without losing data

2 Answers 91 Views
Grid
This is a migrated thread and some comments may be shown as answers.
G S S
Top achievements
Rank 1
G S S asked on 22 Apr 2009, 08:47 PM

I have a RADGrid on my site.

It is bound to a datatable, which is populated by a stored procedure (just selecting all the fields from a table in Sql Server).

There are 78 records in the table. There are 78 records in RADGrid. On each page of the grid, I cannot show this many records. This is fine, but if I go to the next page, the actual content is missing and all I see is just the title bar (drag category here to filter, or something). What (if anything) do I need to do to enable paging? Assuming this is causing the issue. If I go back to the previous page (page 1), there is nothing there.

I am also using RADAjaxPanel but I get the same problem without it.

How can I fix this?

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Apr 2009, 09:13 AM
Hi,

I am not sure of your question but  you might have such  issues if you are using Simple DataBinding. I suggest you use the AdvancedDataBinding technique Of RadGrid and set the AllowPaging property of the RadGrid to True. You can set the page size of your choice.

Hope this helps .


Thanks,
Princy
0
Daniel
Telerik team
answered on 23 Apr 2009, 10:01 AM
Hello,

This may happen if you bind RadGrid as shown below:
protected void Page_Load(object sender, EventArgs e) 
    if(!IsPostBack) 
        RadGrid1.DataSource = myDataSet; 

Use Advanced Data Binding as suggested by Princy to avoid this behavior.

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
G S S
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or