예제 #1
0
        public override RectangleF ArrangeCell(RectangleF clientRect, GridCellElement cell)
        {
            GridViewRowDetailsExtended grid = (GridViewRowDetailsExtended)Owner.GridViewElement.GridControl;

            if (ReferenceEquals(cell.ColumnInfo, grid.DetailsColumn))
            {
                cell.StretchHorizontally  = true;
                cell.BypassLayoutPolicies = true;

                if (cell.RowElement is RowDetailsRowElement)
                {
                    if (((GridViewRowDetailsExtended)cell.RowElement.GridControl).EnableAllExpand && ((GridViewRowDetailsExtended)cell.RowElement.GridControl).ShowRowDetails)
                    {
                        return(new RectangleF(0, Owner.RowHeight, _availableSize.Width - _systemWidth, grid.DetailsRowHeight - Owner.RowHeight));
                    }
                    else if (((GridViewRowDetailsExtended)cell.RowElement.GridControl).ShowRowDetails)
                    {
                        return(cell.RowElement.IsCurrent ? new RectangleF(0, Owner.RowHeight, _availableSize.Width - _systemWidth, grid.DetailsRowHeight - Owner.RowHeight) : RectangleF.Empty);
                    }
                    else
                    {
                        return(RectangleF.Empty);
                    }
                }
                else
                {
                    return(RectangleF.Empty);
                }
            }

            if (cell is GridDataCellElement)
            {
                clientRect.Height = Owner.RowHeight;
            }

            return(base.ArrangeCell(clientRect, cell));
        }
예제 #2
0
        public override void UpdateInfo()
        {
            GridViewRowDetailsExtended grid = ((GridViewRowDetailsExtended)GridControl);

            if (grid != null)
            {
                if (grid.EnableAllExpand)
                {
                    RowInfo.Height = grid.ShowRowDetails ? grid.DetailsRowHeight : TableElement.RowHeight;
                }
                else
                {
                    if (grid.ShowRowDetails)
                    {
                        RowInfo.Height = !RowInfo.IsCurrent ? TableElement.RowHeight : ((GridViewRowDetailsExtended)GridControl).DetailsRowHeight;
                    }
                    else
                    {
                        RowInfo.Height = TableElement.RowHeight;
                    }
                }
            }
            base.UpdateInfo();
        }