我正在使用同步融合网格控件。将网格转换为单词会给我一个未找到入口点异常。
这是我到目前为止的代码
private void cmdSaveData_Click(object sender, EventArgs e)
{
////CEC: this btn is labeled to Define a new group
//cmdDefineGroup_Click(sender, e);
GridWordConverter converter = new GridWordConverter(true, true);
converter.DrawHeader += new GridWordConverterBase.DrawDocHeaderFooterEventHandler(converter_DrawHeader);
converter.DrawFooter += new GridWordConverterBase.DrawDocHeaderFooterEventHandler(converter_DrawFooter);
converter.GridToWord("Sample.doc", theGrid);
System.Diagnostics.Process.Start("Sample.doc");
}
void converter_DrawFooter(object sender, DocHeaderFooterEventArgs e)
{
e.Footer.AddParagraph().AppendText("Copyright 2001-2008");
}
void converter_DrawHeader(object sender, DocHeaderFooterEventArgs e)
{
e.Header.AddParagraph().AppendText("Syncfusion Inc.");
}
这是堆栈跟踪
at Syncfusion.Windows.Forms.Grid.IGridVolatileData.get_HasColCount()
at Syncfusion.Windows.Forms.Grid.GridModel.get_ColCount()
at Syncfusion.GridHelperClasses.GridWordConverter.GridToWord(String filename, GridControlBase grid)
at FP.frmData.cmdSaveData_Click(Object sender, EventArgs e) in C:\FP\frmData.cs:line 365