文档半岛外围网上直营>>DevExpress WinForm中文手册>>如何预览XtraGrid控件
如何预览XtraGrid控件
下面的示例展示了如何预览XtraGrid。
C#:
private void ShowGridPreview(DevExpress.XtraGrid.GridControl grid) {
// Check whether the Grid Control can be previewed.
if(!grid.IsPrintingAvailable) {
MessageBox.Show("The 'DevExpress.XtraPrinting' Library is not found", "Error");
return;
}
// Opens the Preview window.
grid.ShowPreview();
}
VB.NET:
Sub ShowGridPreview(ByVal grid As DevExpress.XtraGrid.GridControl)
' Check whether the Grid Control can be previewed.
If Not grid.IsPrintingAvailable Then
MessageBox.Show("The 'DevExpress.XtraPrinting' Library is not found", "Error")
Return
End If
' Opens the Preview window.
grid.ShowPreview()
End Sub
下图显示了一个示例网格的预览窗口。

QQ交谈
在线咨询

渝公网安备
50010702500608号

客服热线