gridGroupingControl1.TableModel.CellModels.Add("DateTimePicker", new CustomDateTimeCellModel(gridGroupingControl1.TableModel)); this.gridGroupingControl1.TableDescriptor.Appearance.AnyRecordFieldCell.CellType = "DateTimePicker"; GridCellRendererBase renderer = this.gridGroupingControl1.TableControl.CellRenderers["DateTimePicker"]; CustomDateTimeCellRenderer dateTimeCellRenderer = renderer as CustomDateTimeCellRenderer; public class CustomDateTimeCellModel : DateTimeCellModel { /// <summary> /// Initializes a new instance of the <see cref="Syncfusion.GridHelperClasses.DateTimeCellModel"/> class. /// </summary> /// <param name="grid">The grid model.</param> public CustomDateTimeCellModel(GridModel grid) : base(grid) { } public override GridCellRendererBase CreateRenderer(GridControlBase control) { return new CustomDateTimeCellRenderer(control,this); } } public class CustomDateTimeCellRenderer : DateTimeCellRenderer { public CustomDateTimeCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { grid.Controls.RemoveAt(1); grid.Controls.Add(new CustomDateTimePicker()); } public string Property1 { get; set; } } |