static void ModelQueryCellModel(object sender, GridQueryCellModelEventArgs e) { if (e.CellModel == null) { IGridCellModelFactory pGridCellObjectFactory = GridFactoryProvider.CellModelFactory; if (pGridCellObjectFactory != null) { e.CellModel = pGridCellObjectFactory.CreateCellModel(e.CellType, (GridModel)sender); } } }
/// <summary> /// Provide cell types on demand /// </summary> /// <param name="e"></param> protected override void OnQueryCellModel(GridQueryCellModelEventArgs e) { base.OnQueryCellModel(e); if (e.CellModel == null) { IGridCellModelFactory pGridCellObjectFactory = GridFactoryProvider.CellModelFactory; if (pGridCellObjectFactory != null) { e.CellModel = pGridCellObjectFactory.CreateCellModel(e.CellType, this); } } }