简体   繁体   English

重置Gridview后,网格视图记录将显示在导出Excel工作表中

[英]After reset the Gridview .the grid view record will shown in export excel sheet

I have 3 buttons: View button, Reset button and Export excel button with in a date range(start date and end date). 我有3个按钮:日期范围(开始日期和结束日期)中的查看按钮,重置按钮和导出excel按钮。
In View button, the gridview will shown within a date range. 在查看按钮中,网格视图将显示在日期范围内。
In Reset button, the gridview will reset. 在“重置”按钮中,gridview将重置。

I used, 我用了,

gvrecord.datasource=null;
gvrecord.databind();

But after reset, the gridview record will shown in export excel sheet. 但是重置后,gridview记录将显示在导出excel表中。

要重置GridView数据,请使用:

gvrecord.Rows.Clear();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM