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

[Solved] filter after export the grid to excel

10 Answers 218 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vairam
Top achievements
Rank 1
vairam asked on 28 May 2008, 04:59 AM
Hi

Im having problem when filter the grid.Im having my grid inside the ajax panel and export button also inside the ajax panel.I have enabled paging,sorting and filtering in grid.Initially the filter option is working fine.when i click the export button and save the exported excel to local.after that click the filter,the filter option (Start with,EndsWith,EqualTo...) not displaying why? other than filter paging,sorting is working fine.After export the grid if i click the paging or sorting that is working fine.after that click the filter option its comes properlly.After export the grid then click the filter that point only filter options not displaying.can any one tell me why?

10 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 May 2008, 06:51 AM
Hi Vairam,

Try setting the AutoPostBackOnFilter to true as shown below.

ASPX:
<telerik:GridBoundColumn DataField="ProductName"  AutoPostBackOnFilter="true" HeaderText="ProductName" UniqueName="ProductName">  
                    </telerik:GridBoundColumn> 

Princy.
0
vairam
Top achievements
Rank 1
answered on 28 May 2008, 07:32 AM
Hi Princy

After setting AutoPostBackOnFilter="true" its not working.I found another one issue after export the grid my page dropdown box also not expanding.I think the problem is exporting the grid.I have used this code for export

RadGridGjob.ExportSettings.IgnorePaging =

true;

RadGridGjob.MasterTableView.Columns.FindByUniqueName(

"EditTemplateColumn").Visible = false;

RadGridGjob.MasterTableView.Columns.FindByUniqueName(

"DeleteColumn").Visible = false;

RadGridGjob.ExportSettings.FileName =

"GJobDetails";

RadGridGjob.ExportSettings.ExportOnlyData =

true;

RadGridGjob.ExportSettings.OpenInNewWindow =

true;

RadGridGjob.MasterTableView.ExportToExcel();

0
Shinu
Top achievements
Rank 2
answered on 28 May 2008, 09:13 AM
Hi Vairam,

Try rebinding the Grid after doing Export in the Export button click event.

CS:
protected void Button1_Click(object sender, EventArgs e) 
 { 
    RadGrid1.MasterTableView.ExportToExcel(); 
    RadGrid1.Rebind();    
  } 


Thanks
Shinu.
0
vairam
Top achievements
Rank 1
answered on 28 May 2008, 09:32 AM
Hi shinu

After export the grid i rebind the grid also.After that also its not working.the Filter options not displaying and dropdown not expanding.

Thanks
Vairam
0
Shinu
Top achievements
Rank 2
answered on 28 May 2008, 10:18 AM
Hi,

Set  AutoPostBackOnFilter  to false and see whether the FilterMenu is showing or not.

Shinu
0
vairam
Top achievements
Rank 1
answered on 28 May 2008, 12:34 PM
Hi

AutoPostBackOnFilter="false"  that also not working .when i click the filter image the filter option (StartWith,EndsWith,EqualTo,...)not display in dropdown

0
Shinu
Top achievements
Rank 2
answered on 29 May 2008, 10:52 AM
Hi,

Are you binding the Grid using AdvanceDataBinding techniques?
Advanced data-binding

Shinu.
0
vairam
Top achievements
Rank 1
answered on 29 May 2008, 10:56 AM

protected

void RadGridGjob_NeedDataSource(object source, GridNeedDataSourceEventArgs e)

{

try

{

dttbl =GetRecords();
RadGrid.DataSource = dttbl ;
}

catch (Exception exGJob)

{

}

}

0
Kabir
Top achievements
Rank 1
answered on 10 Jun 2008, 05:55 PM
I am having the same problem. For me, it is occurring whether I use simple or automatic databinding. I am not using Ajax and I am calling the export to excel command client side. The only way to get the controls to work again is to refresh the page via the browser.
0
Princy
Top achievements
Rank 2
answered on 23 Jun 2008, 05:33 AM
Hi,

Go through the following KB article.
Filtering Menu fails to display after Export from AJAXified Grid

Thanks
Princy.
Tags
Grid
Asked by
vairam
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
vairam
Top achievements
Rank 1
Shinu
Top achievements
Rank 2
Kabir
Top achievements
Rank 1
Share this question
or