/// <summary> /// Returns a control to display and edit the underlying data. /// </summary> /// <returns></returns> protected override Control GetControl() { RadDatePicker control = (RadDatePicker)base.GetControl(); control.SetBinding(RadDatePicker.InputModeProperty, new Binding("InputMode") { Source = this }); return(control); }
public override FrameworkElement CreateCellEditElement(GridViewCell cell, object dataItem) { this.SetBinding(ColumnsMaskDateTime.ValueProperty, CreateValueBinding(dataItem)); this.BindingTarget = RadDateTimePicker.SelectedValueProperty; RadDatePicker picker = new RadDatePicker(); picker.IsTooltipEnabled = false; picker.TimeInterval = this.TimeInterval; picker.DisplayFormat = DateTimePickerFormat.Short; //picker.SetBinding(this.BindingTarget, this.CreateValueBinding()); picker.SetBinding(this.BindingTarget, CreateValueBinding(dataItem)); return(picker); }