Example #1
0
        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);
                }
            }
        }
Example #2
0
        /// <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);
                }
            }
        }