Hi there,
The question is similar to Radgrid export after filtering, and I follow the solution.
This
and this
It doesn't work.
I still get the whole data.
Is there any property I miss?
This is my define in .aspx
The question is similar to Radgrid export after filtering, and I follow the solution.
This
foreach
(GridFilteringItem filter
in
radGrid.MasterTableView.GetItems(GridItemType.FilteringItem))
{
filter.Visible =
false
;
}
radGrid.MasterTableView.ExportToExcel();
and this
radGrid.ExportSettings.IgnorePaging =
true
;
radGrid.ExportSettings.ExportOnlyData =
true
;
radGrid.ExportSettings.FileName =
"MyFile_"
+ DateTime.Now.ToShortDateString();
radGrid.MasterTableView.ExportToExcel();
It doesn't work.
I still get the whole data.
Is there any property I miss?
This is my define in .aspx
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
ActiveItemStyle-Wrap
=
"false"
AllowFilteringByColumn
=
"False"
AllowPaging
=
"False"
AllowSorting
=
"True"
AlternatingItemStyle-Wrap
=
"false"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
CommandItemStyle-Wrap
=
"false"
DataSourceID
=
"SqlDataSource1"
EnableLinqExpressions
=
"False"
GridLines
=
"None"
HeaderStyle-Wrap
=
"false"
Height
=
"600"
ItemStyle-Wrap
=
"false"
OnPreRender
=
"RadGrid1_PreRender"
PagerStyle-AlwaysVisible
=
"true"
PageSize
=
"20"
SelectedItemStyle-Wrap
=
"false"
ShowGroupPanel
=
"True"
Skin
=
"Web20"
Width
=
"1200"
>
<
grouppanel
text="<%$ Resources:MessageResource, MSG_RECMain_Group_Drop %>"></
grouppanel
>
<
groupingsettings
casesensitive
=
"false"
showungroupbutton
=
"true"
/>
<
clientsettings
allowdragtogroup
=
"true"
enablepostbackonrowclick
=
"false"
enablerowhoverstyle
=
"true"
>
<
selecting
allowrowselect
=
"true"
enabledragtoselectrows
=
"false"
/>
<
clientevents
ongridcreated
=
"RadGrid1_GridCreated"
onrowselected
=
"RowSelected"
></
clientevents
>
<
resizing
allowcolumnresize
=
"True"
allowresizetofit
=
"true"
allowrowresize
=
"false"
clipcellcontentonresize
=
"true"
enablerealtimeresize
=
"false"
resizegridoncolumnresize
=
"false"
/>
<
scrolling
allowscroll
=
"true"
usestaticheaders
=
"true"
/>
</
clientsettings
>
<
mastertableview
allowmulticolumnsorting
=
"False"
datakeynames
=
"PCID"
datasourceid
=
"SqlDataSource1"
>
<
rowindicatorcolumn
visible
=
"False"
></
rowindicatorcolumn
>
<
expandcollapsecolumn
created
=
"True"
></
expandcollapsecolumn
>
<
CommandItemSettings
ShowExportToExcelButton
=
"true"
/>
<
Columns
></
Columns
>
</
mastertableview
>
</
telerik:RadGrid
>