Problems on loading radgrid with filtering option for autogenerate column

3 posts, 0 answers
  1. Mugil
    Mugil avatar
    21 posts
    Member since:
    Mar 2013

    Posted 23 Mar 2013 Link to this post


         Im Using Telerik Radgrid to import and export Excel.
         the import and export functions are working good.
         in this i directly bind the data from excel to radgrid.
         now my problem is....
        1)im using filteringbycolumn property to filter the radgrid its not working(the grid data will empty)
            even i gave autogeneratecolumn=true
        2)im trying to give page size so i gave allowpaging=true  it show only pager on below
               if i click next page button means the grid geeting empty

          pls give the solution for this asap

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 25 Mar 2013 Link to this post


    PLease make sure that you are using Advanced data binding as shown below.
    <telerik:RadGrid ID="RadGrid1"  runat="server" AutoGenerateColumns="true" PageSize="3" OnNeedDataSource="RadGrid1_NeedDataSource"  AllowPaging="true" AllowFilteringByColumn="true">
     <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
    protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
           SqlConnection con1 = new SqlConnection(WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString);
           SqlCommand cmd = new SqlCommand("SELECT top 25 * FROM [Orders]", con1);
           SqlDataAdapter ad = new SqlDataAdapter(cmd);
           DataSet ds = new DataSet();
          RadGrid1.DataSource = ds;

  3. DevCraft R3 2016 release webinar banner
  4. Mugil
    Mugil avatar
    21 posts
    Member since:
    Mar 2013

    Posted 25 Mar 2013 Link to this post

    Hi Princy,

            Thank you for reply now its working good
             I have one more doubt if we upload files from different system with same side in server means it will get effected?

    Thanking you,

Back to Top