void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) { RadDateTimeEditor radeditor = this.radGridView1.ActiveEditor as RadDateTimeEditor; if (radeditor != null) { radeditor.CustomFormat = "F"; } }
private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) { RadDateTimeEditor editor = this.radGridView1.ActiveEditor as RadDateTimeEditor; if (editor != null) { ((RadItem)editor.EditorElement).ToolTipText = "Modify the date to filter the rows in the grid"; editor.CustomFormat = "MMMM d, yyyy"; } }
void grid_CellEditorInitialized(object sender, GridViewCellEventArgs e) { RadDateTimeEditor editor = e.ActiveEditor as RadDateTimeEditor; if (editor != null) { this.GridControl.CellEditorInitialized -= grid_CellEditorInitialized; RadDateTimeEditorElement element = editor.EditorElement as RadDateTimeEditorElement; RadDateTimePickerCalendar calendar = element.CurrentBehavior as RadDateTimePickerCalendar; calendar.PopupControl.AnimationEnabled = false; calendar.ShowDropDown(); } }
private void radGridViewSocTime_CellEditorInitialized(object sender, GridViewCellEventArgs e) { RadDateTimeEditor dateTimeEditor = e.ActiveEditor as RadDateTimeEditor; if (dateTimeEditor != null) { radGridViewSocTime.CellEditorInitialized -= radGridViewSocTime_CellEditorInitialized; RadDateTimeEditorElement editroElement = (RadDateTimeEditorElement)dateTimeEditor.EditorElement; MaskDateTimeProvider provider = editroElement.TextBoxElement.Provider as MaskDateTimeProvider; if (provider != null) { provider.AutoSelectNextPart = true; } } }
void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e) { if (this.radGridView1.ActiveEditor != null) { if (this.radGridView1.ActiveEditor is RadDropDownListEditor) { RadDropDownListEditor comboboxEditor = this.radGridView1.ActiveEditor as RadDropDownListEditor; comboboxEditor.EditorElement.Alignment = ContentAlignment.MiddleCenter; comboboxEditor.EditorElement.StretchVertically = false; this.radGridView1.CurrentCell.Alignment = ContentAlignment.MiddleCenter; } else if (this.radGridView1.ActiveEditor is RadDateTimeEditor) { RadDateTimeEditor comboboxEditor = this.radGridView1.ActiveEditor as RadDateTimeEditor; comboboxEditor.EditorElement.Alignment = ContentAlignment.MiddleCenter; comboboxEditor.EditorElement.StretchVertically = false; this.radGridView1.CurrentCell.Alignment = ContentAlignment.MiddleCenter; } } }
private void gvMeasures_CellEditorInitialized(object sender, GridViewCellEventArgs e) { using (var measureService = _serviceFactory.Create <IMeasureService>()) { var standard = e.Row.DataBoundItem as LoadMeasureModel; if (standard != null) { var maxDate = measureService.MaxDateAllowed(standard.StandardId, _selectedBatch.GeneticLineId, _selectedBatch.CreatedDate); RadDateTimeEditor editor = gvMeasures.ActiveEditor as RadDateTimeEditor; if (editor != null) { editor.MinValue = _selectedBatch.CreatedDate; editor.MaxValue = maxDate; } } } }