private void Form1_Load(object sender, System.EventArgs e) { // initialize grid _flex.Cols[0].Width = 22; _flex.DrawMode = C1.Win.C1FlexGrid.DrawModeEnum.OwnerDraw; _flex.AllowResizing = C1.Win.C1FlexGrid.AllowResizingEnum.Both; _flex.Styles.Normal.WordWrap = true; _flex.Styles.Normal.ImageAlign = C1.Win.C1FlexGrid.ImageAlignEnum.Stretch; // populate grid Random rnd = new Random(); for (int c = 1; c < _flex.Cols.Count; c++) { _flex.Cols[c].DataType = typeof(int); _flex.Cols[c].TextAlign = C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter; for (int r = 1; r < _flex.Rows.Count; r++) { _flex[r, c] = rnd.Next(1000000); } } // autosize first column _flex.AutoSizeCol(1); }