导出具有嵌套网格的gridview的excel [英] export in excel of gridview having nested grid

查看:61
本文介绍了导出具有嵌套网格的gridview的excel的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在具有嵌套网格视图的Excel中导出网格视图?这是给出下面给出的错误...





导出excel时出错:控件'GridView2'类型'GridView'必须放在一个带有runat = server的表单标签内。

How to export grid view in excel having nested grid view ? this is giving erroe given below...


Error giving while exporting in excel : Control 'GridView2' of type 'GridView' must be placed inside a form tag with runat=server.

推荐答案

把它放在你的页面代码中
Put this in your page's code
public override void VerifyRenderingInServerForm(Control control)
{
   /* Verifies that the control is rendered */
}



我强烈怀疑这是问题所在。如果这不能解决问题,请告诉我。



问候..


I strongly suspect this is the issue. If this don't solve the issue,let me know.

Regards..


如错误说明中所述,问题是您的FORM标签。您必须使用FORM标记指定runat =server。如下所示:





< form id =form1runat =server>



如果这不能解决您的问题,请发布您的代码(aspx和cs)。
As mentioned in error description, issue is with your FORM tag. You have to specify runat="server" with FORM tag. Like below:


<form id="form1" runat="server">

Post your code(aspx & cs) if this does not solve your issue.


这几乎不是一个问题。我们无法看到您的代码,以便我们可以判断出错误的含义。请按照以下链接找到解决方案:

将嵌套的GridView数据导出到asp.net中的excel [ ^ ]

< a href =http://forums.asp.net/t/1806107.aspx>将嵌套的Gridview导出到Excel [ ^ ]
That doesn't nearly a question though. We can't see your code so that we can tell what that error mean.Better follow these links and find solution:
Export Nested GridView data to excel in asp.net[^]
Export Nested Gridview to Excel[^]


这篇关于导出具有嵌套网格的gridview的excel的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆