/// <summary> /// Gets the control value. /// </summary> /// <returns></returns> public override object GetControlValue() { if (!HasCurrentCellState) { return(base.GetControlValue()); } #if WinRT || UNIVERSAL return(this.CurrentCellRendererElement.GetValue(IsInEditing ? SfDatePicker.ValueProperty : TextBlock.TextProperty)); #else if (IsInEditing) { var dateEdit = this.CurrentCellRendererElement as DateTimeEdit; DateTime dateValue; if (dateEdit.DateTime != System.DateTime.MaxValue && dateEdit.Text != string.Empty) { DateTime.TryParse(dateEdit.Text, out dateValue); return(dateValue); } else { return(null); } } return(CurrentCellRendererElement.GetValue(TextBlock.TextProperty)); #endif }
/// <summary> /// Gets the control value. /// </summary> /// <returns></returns> public override object GetControlValue() { if (!HasCurrentCellState) { return(base.GetControlValue()); } return(CurrentCellRendererElement.GetValue(IsInEditing ? TextBox.TextProperty : TextBlock.TextProperty)); }
/// <summary> /// Gets the control value. /// </summary> /// <returns></returns> public override object GetControlValue() { if (HasCurrentCellState) { return(CurrentCellRendererElement.GetValue(IsInEditing ? Selector.SelectedValueProperty : ContentControl.ContentProperty)); } return(base.GetControlValue()); }
/// <summary> /// Gets the control value. /// </summary> /// <returns></returns> public override object GetControlValue() { if (!HasCurrentCellState) { return(base.GetControlValue()); } return(CurrentCellRendererElement.GetValue(IsInEditing ? SfMultiColumnDropDownControl.SelectedValueProperty : TextBlock.TextProperty)); }
private void sfTextBoxExt_TextChanged(object sender, TextChangedEventArgs e) { var sfTextBoxExt = sender as SfTextBoxExt; if (string.IsNullOrEmpty(sfTextBoxExt.Text)) { // Set null to value of SfDatePicker explicitly CurrentCellRendererElement.SetValue(SfDatePicker.ValueProperty, null); } }
/// <summary> /// Gets the control value. /// </summary> /// <returns></returns> public override object GetControlValue() { if (!HasCurrentCellState) { return(base.GetControlValue()); } #if UWP return(this.CurrentCellRendererElement.GetValue(IsInEditing ? SfDatePicker.ValueProperty : TextBlock.TextProperty)); #else return(CurrentCellRendererElement.GetValue(IsInEditing ? DateTimeEdit.DateTimeProperty : TextBlock.TextProperty)); #endif }
/// <summary> /// Gets the control value. /// </summary> /// <returns></returns> public override object GetControlValue() { if (HasCurrentCellState) { var contentControl = CurrentCellRendererElement as ContentControl; if (contentControl != null && !(contentControl.Content is FrameworkElement)) { return(CurrentCellRendererElement.GetValue(ContentControl.ContentProperty)); } } return(base.GetControlValue()); }
/// <summary> /// Gets the control value. /// </summary> /// <returns></returns> public override object GetControlValue() { return(HasCurrentCellState ? CurrentCellRendererElement.GetValue(ToggleButton.IsCheckedProperty) : base.GetControlValue()); }
public override object GetControlValue() { return(CurrentCellRendererElement.GetValue(SfComboBox.TextProperty)); }