标签:
public gridview datagrid2gridview(datagrid dg)
{
gridview gv = new gridview();
foreach(var p in dg.columns)
{
if(p is boundcolumn)
{
boundcolumn dgc = (boundcolumn)p;
var gvc=new boundfield();
gvc.headertext=dgc.headertext;
gvc.visible=dgc.visible;
gvc.datafield=dgc.datafield;
gvc.headerstyle.width=dgc.headerstyle.width;
gv.columns.add(gvc);
}
}
}
标签:
原文地址:http://www.cnblogs.com/joesphos/p/5241588.html