private void grid_ColWidthsChanged(object sender, GridRowColSizeChangedEventArgs e)
        {
            if (this.inColWidthsChanged)
            {
                return;
            }
            inColWidthsChanged = true;

            if (this._colSizeBehavior != GridColSizeBehavior.EqualProportional)
            {
                this.colRatios = new double[this.grid.Model.ColCount + 1];
                double dWidth = this.grid.ClientSize.Width;
                for (int col = 0; col <= this.grid.Model.ColCount; ++col)
                {
                    this.colRatios[col] = this.grid.Model.ColWidths[col] / dWidth;
                }
            }
            inColWidthsChanged = false;
        }
Esempio n. 2
0
 private void TableModel_ColWidthsChanged(object sender, GridRowColSizeChangedEventArgs e)
 {
     _grid.AdjustRowHeights();
 }