Ejemplo n.º 1
0
        private VersatileDataGridRowStyle GetRowStyle(int rowIndex)
        {
            //TODO: support alternating styles (pattern: 0,0,1,1 or 0,1 etc)
            VersatileDataGridRowStyle rowStyle = (VersatileDataGridRowStyle)this.aRowStyles[0];

            return(rowStyle);
        }
Ejemplo n.º 2
0
        public Rectangle GetBoundingRect(int rowIndex, int colIndex)
        {
            Rectangle rct = new Rectangle(0, 0, 0, 0);
            DataView  dv  = this.GetDataView();

            DataColumn col      = dv.Table.Columns[colIndex];
            EPoint     pntRange = this.columnHeaders1.GetColumnLeftRight(col.ColumnName);

            rct.X     = pntRange.X;
            rct.Width = pntRange.Y - pntRange.X;


            int nTotalHeight = 0;

            for (int y = 0; y <= rowIndex; y++)
            {
                VersatileDataGridRowStyle rowStyle = this.GetRowStyle(y);
                if (y == rowIndex)
                {
                    rct.Y      = nTotalHeight;
                    rct.Height = rowStyle.Height;
                }
                nTotalHeight += rowStyle.Height;
            }
            return(rct);
        }