i want datetimepickeradv like feature of AutoForwarding in gridcontrol.
i have used event CurrentCellStartEditing to show calendar in gridcontrol cell.
style.CellValueType = GetType(Date)
style.CellType = GridCellTypeName.MonthCalendar
style.Format = "dd/MM/yyyy".
but this cell does not act like datetimepickeradv.....
can we have same working like datetimepickeradv in gridcontrol cell.
thanks & regards
raman kumar
|
this.gridControl1[2, 2].CellType = "Control";
this.gridControl1[2, 2].Control = new DateTimePickerAdv() { AutoForwarding = true, Format = DateTimePickerFormat.Short, ShowCheckBox = false }; |
i have tried this but have some issue with this so in place of this method.
i have used DateTimeCellRenderer (which works well but takes some time in loading)
GridControl1.CellModels.Add("DateTimePicker", New DateTimeCellModel(GridControl1.Model))
it works fine. but only one issue in it.
i am setting celltype in event CurrentCellStartEditing.
Dim currentCell As GridCurrentCell = Me.GridControl1.CurrentCell
Dim style As GridStyleInfo = GridControl1.Model(currentCell.RowIndex, currentCell.ColIndex)
style.CellType = "DateTimePicker"
when i try to start edit in first row, it takes a little bit extra time to load control in first row, in another rows it works fine.