Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        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);
        }