private void ShiftingSplitter()
        {
            GridViewInfo viewInfo         = gridViewPanel1.GetViewInfo() as GridViewInfo;
            int          splitterPosition = 0;

            height = viewInfo.ViewRects.ColumnPanel.Bottom + 2;
            if (viewInfo.GetGridRowInfo(GridControl.AutoFilterRowHandle) != null)
            {
                height += viewInfo.CalcRowHeight(viewInfo.GInfo.Graphics, GridControl.AutoFilterRowHandle, -1, 0) + 4;
            }
            splitterPosition = height;
            Dictionary <int, int> .ValueCollection values = FixedRows.Values;
            for (int i = 0; i < values.Count; i++)
            {
                height += values.ToArray()[i] + 1;
            }
            splitterPosition = Math.Max(height, splitterPosition);
            if (splitterPosition >= viewInfo.ViewRects.EmptyRows.Bottom)
            {
                splitterPosition -= viewInfo.ViewRects.EmptyRows.Height;
            }
            gridSplitContainer1.SplitterPosition = splitterPosition;
            splitterPosition -= viewInfo.ViewRects.EmptyRows.Bottom - viewInfo.ViewRects.EmptyRows.Top;
            if (viewInfo.ViewRects.EmptyRows.Top != 0)
            {
                gridSplitContainer1.SplitterPosition = splitterPosition;
            }
        }
예제 #2
0
        private int GetRowHeight(GridView view, int rowHandle)
        {
            GridViewInfo viewInfo = GetViewInfo(view);

            return(viewInfo.CalcRowHeight(view.GridControl.CreateGraphics(), rowHandle, 0));
        }