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

Radgrid paging

1 Answer 23 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Maksut
Top achievements
Rank 1
Maksut asked on 26 Sep 2012, 07:19 AM
Hi,

My codes is here.
protected void Button1_Click(object sender, EventArgs e)
       {
 
 DataTable dt = new DataTable();
           OleDbDataAdapter da=new OleDbDataAdapter("Select NAME, PHONE FROM TBL_CITY WHERE POP='"+TextBox1.Text+"' and ROWNUM<150",conn);
           da.Fill(dt);
           RadGrid1.DataSource = dt;
           RadGrid1.DataBind();
       }

<telerik:RadGrid ID="RadGrid2" runat="server" AllowPaging="True">
    </telerik:RadGrid>


When I click the button1 its ok. Radgrid is working.

But when I click the Next page or any page number, I can't see radgrid. 


For example:

I click the button1. Radgrid is ok.

When I click the 5. page number. I cant see radgrid.

After when ı click the button1. I am seeing 5. page radgrid :) 



How can I do? 

Sorry for my english.

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 28 Sep 2012, 01:13 PM
Hello,

As this help topic says you should not use simple databinding(calling DataBind method when you are using advanced functionality of RadGrid as paging, sorting, grouping, filtering, etc.

Instead you should use advanced databinding with NeedDataSource or declarative datasource.

Regards,
Andrey
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 now.
Tags
Grid
Asked by
Maksut
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or