【发布时间】:2015-09-08 02:53:41
【问题描述】:
其中有一个RadGrid 和Export to Excel 按钮。在我的 Web 应用程序的一个网页中,RadGrid 之外还有一个 asp Button 和 2 个 DropDowns。
2个DropDowns用于过滤aspButton点击时RadGrid的记录。
HTML 代码
<asp:DropDownList ID="ddlMonth" runat="server" Width="207px" AppendDataBoundItems="true">
</asp:DropDownList>
<asp:DropDownList ID="ddlYear" runat="server" Width="207px" AppendDataBoundItems="true">
</asp:DropDownList>
<asp:Button ID="btnSearch" runat="server" Text="Generate" Width="80px" />
<telerik:RadGrid ID="GridReport" runat="server" AllowPaging="True" AllowSorting="True" AllowFilteringByColumn="True" ShowGroupPanel="True"
CellSpacing="0" GridLines="None" Width="100%" Skin="Outlook" DataSourceID="odsMonthlyStatusReport" OnItemDataBound="GridReport_ItemDataBound">
<ClientSettings AllowDragToGroup="True" />
<GroupingSettings CaseSensitive="false"></GroupingSettings>
<MasterTableView AllowFilteringByColumn="true" AllowMultiColumnSorting="false" AutoGenerateColumns="false"
CommandItemDisplay="Top" DataKeyNames="RequestID" EnableGroupsExpandAll="true" GroupLoadMode="Client" PageSize="50">
<CommandItemSettings ShowAddNewRecordButton="false" ShowExportToExcelButton="true" />
<SortExpressions>
<telerik:GridSortExpression FieldName="RequisitionNo" SortOrder="Descending" />
</SortExpressions>
<PagerStyle AlwaysVisible="True" PageSizeControlType="RadComboBox" Position="Bottom" PageSizes="50,100,150,200" />
<Columns>
// all columns code
</Columns>
</MasterTableView>
<ExportSettings SuppressColumnDataFormatStrings="True" IgnorePaging="True" ExportOnlyData="True" Excel-Format="ExcelML" OpenInNewWindow="True" FileName="eAP_Report_MonthlyStatus" Excel-FileExtension="xls"></ExportSettings>
</telerik:RadGrid>
除了点击RadGrid 的Export to Excel 按钮之后,如果我点击asp 按钮(“生成”),一切正常,它根本不起作用。即,在我点击 Export to Excel 之前,asp 按钮将起作用,但在我点击 Export to Excel 后它将不起作用
请让我知道为什么会出现此问题以及可能的解决方案。提前致谢
【问题讨论】:
标签: asp.net button export-to-excel radgrid