public GridStyleInfo this[int rowIndex, int colIndex] { get { GridStyleInfo style = _dataCache[rowIndex, colIndex]; if (style == null) { if (rowIndex > _gridModel.Data.RowCount) { _gridModel.Data.RowCount = this.RowCount; } if (colIndex > _gridModel.Data.ColCount) { _gridModel.Data.ColCount = this.ColCount; } GridStyleInfoStore store = _gridModel.Data[rowIndex, colIndex]; if (store == null) { store = new GridStyleInfoStore(); _gridModel.Data[rowIndex, colIndex] = store; } style = new GridStyleInfo(new GridStyleInfoIdentity(this, rowIndex, colIndex), store); style.BeginInit(); GC.SuppressFinalize(style.Identity); GridQueryCellInfoEventArgs e = new GridQueryCellInfoEventArgs(rowIndex, colIndex, style); this._gridModel.RaiseQueryCellInfo(e); _dataCache.RowCount = _gridModel.Data.RowCount; _dataCache.ColCount = _gridModel.Data.ColCount; _dataCache[rowIndex, colIndex] = e.Style; style.EndInit(); } return(style); } set { GridStyleInfo style = _dataCache[rowIndex, colIndex]; if (!Object.ReferenceEquals(style, value)) { this[rowIndex, colIndex].ModifyStyle(value, StyleModifyType.Changes); } _gridModel.Data[rowIndex, colIndex] = value.Store; } }