RadGrid Performance Increse

5 posts, 0 answers
  1. Swapnil
    Swapnil avatar
    96 posts
    Member since:
    Aug 2013

    Posted 28 Jul 2014 Link to this post

    I am having one RadGrid and binding one Datatable to it From codebehind.
    At each paging or sorting or drag drop column it goes server side (page refreshed) and then displays.
    is there any professional way i can achieve this with faster speed.
    my code is

    <telerik:RadGrid ID="RadGridEmployeeCost" runat="server" AllowSorting="True" AllowPaging="true"
        AllowFilteringByColumn="true" CellSpacing="0" GridLines="None" HeaderStyle-Font-Bold="true"
        Skin="Web20" OnNeedDataSource="RadGridEmployeeCost_NeedDataSource" ShowGroupPanel="true"
        OnColumnCreated="RadGridEmployeeCost_ColumnCreated">
        <ClientSettings AllowDragToGroup="True" />
    </telerik:RadGrid>

     AND
      protected void RadGridEmployeeCost_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
           {
                   ObjCon.Open();
                   SqlCommand ObjCmd = new SqlCommand("SELECT name,address,TelPhone,EmailId,Qualification FROM WorkSummary", ObjCon);
                   ObjCmd.ExecuteNonQuery();
                   SqlDataAdapter ObjDa = new SqlDataAdapter(ObjCmd);
                   DataSet ds = new DataSet();
                   ObjDa.Fill(ds);
                   RadGridEmployeeCost.DataSource = ds;
               }
           }
     
    protected void RadGridEmployeeCost_ColumnCreated(object sender, GridColumnCreatedEventArgs e)
           {
               if ((e.Column is GridBoundColumn && e.Column.UniqueName == "TelPhone" || e.Column.UniqueName == "EmailId" || e.Column.UniqueName == "Qualification"))
               {
                   GridBoundColumn column = e.Column as GridBoundColumn;
                   column.AllowFiltering = false;
               }
           }

  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 28 Jul 2014 in reply to Swapnil Link to this post

    Hello,

    To achieve better performace please use either client side binding or ClinetDataSource.



    Thanks,
    Jayesh Goyani
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Swapnil
    Swapnil avatar
    96 posts
    Member since:
    Aug 2013

    Posted 30 Jul 2014 Link to this post

    want to bind grid from design . give code
    Thanks
  5. Swapnil
    Swapnil avatar
    96 posts
    Member since:
    Aug 2013

    Posted 30 Jul 2014 in reply to Swapnil Link to this post

    please give code
  6. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 31 Jul 2014 in reply to Swapnil Link to this post

    Hello,

    Curretly working on that.

    Thanks,
    Jayesh Goyani
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017