我想知道是否有一种方法可以获得DataGrid的HTML输出.在数据绑定到网格后我想要原始 HTML.我可以用它来实现这个渲染方法的某种重载吗?谢谢.
var outputBuffer = new StringBuilder(); using (var writer = new HtmlTextWriter(new StringWriter(outputBuffer))) { yourDataGrid.RenderControl(writer); } outputBuffer.ToString();