ASPxGridViewExporter导出Excel过滤指定列
<dxwgv:ASPxGridViewExporter ID="gridExport" runat="server" GridViewID="gvMorderList">
</dxwgv:ASPxGridViewExporter>
gridExport.WriteXlsToResponse();
为ASPxGridView导出Excel,其中有自定义操作列,导出后这列也导出来了是空值,ASPxGridViewExporter控件前台或后台有没有方法和属性控制导出的列
------解决方案--------------------protected void btnXlsxExport_Click(object sender, EventArgs e)
{
grid.Columns["ABC"].Visible=false;//可根据列的ID、FieldName、Caption获取
exporter.WriteXlsxToResponse();
}
实践过,可行!