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

Problems on loading radgrid with filtering option for autogenerate column

2 Answers 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mugil
Top achievements
Rank 1
Mugil asked on 23 Mar 2013, 09:47 AM
HI


     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

  Regards
  P.Mugil

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 25 Mar 2013, 06:43 AM
Hi,

PLease make sure that you are using Advanced data binding as shown below.
aspx:
<telerik:RadGrid ID="RadGrid1"  runat="server" AutoGenerateColumns="true" PageSize="3" OnNeedDataSource="RadGrid1_NeedDataSource"  AllowPaging="true" AllowFilteringByColumn="true">
 <PagerStyle Mode="NextPrevAndNumeric" AlwaysVisible="true" />
</telerik:RadGrid>
C#:
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();
       ad.Fill(ds);
      RadGrid1.DataSource = ds;
   }

Thanks,
Princy.
0
Mugil
Top achievements
Rank 1
answered on 25 Mar 2013, 08:46 AM
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,

Regards
P.Mugil
Tags
Grid
Asked by
Mugil
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mugil
Top achievements
Rank 1
Share this question
or