RadGrid show-off in paging

3 posts, 1 answers
  1. Brygom
    Brygom avatar
    15 posts
    Member since:
    May 2009

    Posted 21 May 2009 Link to this post

    Hi! I have a problem with the RadGrid, I am show a lot data en grid using paging, but if I select another page the radgrid show-off

    i hope your help.

    This is my code:

     RadGrid1.DataSource = data.Query("NoTarjeta", selectsNoTarjeta, "NoTarjeta", toSearch, "%");

    The method Query is:

    public DataSet Query(String type, String selects, String paramWhere, String compare, String comodin)
    List<string> byTable = new List<string>();

      String Query = null;


    foreach (string table in byTable) // Loop through List with foreach
    Query = "SELECT " + selects + " FROM " + table + " WHERE " + paramWhere + " LIKE '" + compare + comodin + "' UNION ALL " + Query;
    Query = Query.Substring(0, Query.Length - 10);

    ConnectToDatabase("localhost", 3306, "data", "root", "xxx");
    MySqlDataAdapter adapter = new MySqlDataAdapter(Query, Userconection);

    return Results;

    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px" 
    <asp:TextBox ID="txSearch" runat="server" Width="343px"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />
    <br />
    <telerik:RadGrid ID="rgResults" runat="server" AllowPaging="True" 
    AllowSorting="True" Skin="Telerik">

  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 21 May 2009 Link to this post

    Hi Brygon,

    You are using simple-Databinding the for the Grid. Try binding the Grid in the NeedDataSource event. Go through the following online demo for getting more details about AdvanceDataBinding techniques.
    Advanced Data Binding

  3. DevCraft R3 2016 release webinar banner
  4. Brygom
    Brygom avatar
    15 posts
    Member since:
    May 2009

    Posted 23 May 2009 Link to this post

    Thanks for you reply! 
Back to Top