DevExpress GridControl 自动适应高度



DevExpress GridControl 自动适应高度,也就是根据行数量自动调节GridControl高度

1、获取行高,运行时无法通过gridview.RowHeight获取,此值为-1

using DevExpress.XtraGrid.Views.Grid.ViewInfo;
...
GridViewInfo vi = gridView1.GetViewInfo() as GridViewInfo;
GridRowInfo ri = vi.RowsInfo.FindRow(10);
int height = 0;
if (ri != null)
    height = ri.Bounds.Height;

你可能感兴趣的:(DevExpress GridControl 自动适应高度)