Can't change pages without losing data

3 posts, 0 answers
  1. G S S
    G S S avatar
    85 posts
    Member since:
    Mar 2008

    Posted 22 Apr 2009 Link to this post

    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. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Apr 2009 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel
    Admin
    Daniel avatar
    4946 posts

    Posted 23 Apr 2009 Link to this post

    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.
Back to Top