Beispiel #1
0
        internal static double GetRowHeight(
            RadGridView radGridView,
            RowElementProvider rowProvider,
            CellElementProvider cellProvider,
            GridViewRowInfo gridViewRowInfo,
            bool exportVisualSettings)
        {
            double val1 = 0.0;

            if (radGridView.AutoSizeRows && exportVisualSettings)
            {
                GridRowElement element1 = rowProvider.GetElement(gridViewRowInfo, (object)null) as GridRowElement;
                element1.InitializeRowView(radGridView.TableElement);
                element1.Initialize(gridViewRowInfo);
                radGridView.TableElement.Children.Add((RadElement)element1);
                foreach (GridViewColumn column in (Collection <GridViewDataColumn>)element1.ViewTemplate.Columns)
                {
                    if (!(column is GridViewRowHeaderColumn) && !(column is GridViewIndentColumn))
                    {
                        GridCellElement element2 = cellProvider.GetElement(column, (object)element1) as GridCellElement;
                        element1.Children.Add((RadElement)element2);
                        element2.Initialize(column, element1);
                        val1 = Math.Max(val1, (double)GridExportUtils.GetCellDesiredSize(element2).Height);
                        GridExportUtils.ReleaseCellElement(cellProvider, element1, element2);
                    }
                }
                GridExportUtils.ReleaseRowElement(radGridView, rowProvider, element1);
            }
            return(Math.Max(val1, (double)radGridView.TableElement.RowScroller.ElementProvider.GetElementSize(gridViewRowInfo).Height));
        }
Beispiel #2
0
 internal static void ReleaseCellElement(
     CellElementProvider cellProvider,
     GridRowElement rowElement,
     GridCellElement cell)
 {
     GridExportUtils.ReleaseCellElement(cellProvider, rowElement, cell, true);
 }