Unplanned
Last Updated: 09 Aug 2016 08:44 by ADMIN
Unplanned
Last Updated: 15 Feb 2017 10:35 by ADMIN
Completed
Last Updated: 06 Sep 2019 11:42 by ADMIN
Release R3 2019
Created by: Enrico
Comments: 1
Category: DataForm
Type: Feature Request
0

Good Morning,

It would be nice to have the possibility to choose if use DateTimePicker or DatePicker during the 'AutoGeneratingField' event.

Something like:

if (e.PropertyType.Equals(typeof(DateTime)))
            {
                e.DateTimeMode = ...RadDataForm.DateTimeMode.OnlyDate, //(or .DateTime) 
            }

Because overriding the 'DataFormField' content with a RadDateTimePicker is a little bit intricate especially for the binding/reference losing.

The control is very helpful to make fast user forms prototipe but in this case it lose all its convenience. 

 

Thank you,

Best Regards,

Enrico 

Completed
Last Updated: 04 Feb 2021 06:14 by ADMIN
Release LIB 2021.1.208 (2/8/2021)
When using a field without a RadDataForm, an null reference exception is thrown when it is focused. 
Unplanned
Last Updated: 15 Sep 2025 10:01 by Martin Ivanov

The selection a RadComboBox hosted in RadDataForm gets cleared on commit changes. This happens when the RadComboBox is added in the EditTemplate and its IsEditable is set to True. Committing the edit clears the TextBox of the ComboBox, which clears the selection.

To work this around, subscribe to the EditEnding event of RadDataForm and clear the DataContext of the RadComboBox element.

  private void RadDataForm_EditEnding(object sender, Telerik.Windows.Controls.Data.DataForm.EditEndingEventArgs e)
  {
      var dataForm = (RadDataForm)sender;
      var myField = dataForm.ChildrenOfType<DataFormDataField>().FirstOrDefault(df => df.Name == "myField");
      if (myField != null)
      {
          var comboBox = (RadComboBox)myField.Content;
          comboBox.DataContext = null;
      }
  }

1 2