我在项目中的添加菜单中选"组件"而不是"用户控件"的方式改写vs中的DataGridView控件,其代码如下:public partial class NDataGridView : DataGridView
{
private ExcelExport.ExcelExporter m_Exporter=new ExcelExport.ExcelExporter();
//该ExcelExport.ExcelExporter控件有一个Export方法导出excel文件,但是其Export方法的第一个参数是当前的网格,第二为文件名
public NDataGridView()
{
base.AllowDrop = true;
base.AllowUserToAddRows = false;
base.AllowUserToDeleteRows = false;
base.AllowUserToOrderColumns = false;
base.AllowUserToResizeColumns = true;
base.AllowUserToResizeRows = true;
base.ReadOnly = true;
base.MultiSelect = false;
}
Public void Export(string strFileName)
{
m_Exporter.Export(base,strFileName);//Export的第一个参数是当前的网格,但是用base却出错
}
}请问Export后的第一个参数怎样传写(Export的第一个参数要是当前的网格)?
谢谢
base DataGridView
base是基类