Setting the Content property of DataFormDataField in the AutoGeneratingField event handler doesn't take any effect. The value should be displayed in the editor area of the data field.
Use manually defined data fields or use a dispatcher in the AutoGeneratingField event handler in order to delay the Content setting.
Setting the Content property of DataFormDataField doesn't take any effect. The value should be displayed in the editor are of the data field.
To work this around, you can use a custom data field.
public class CustomDataFormDataField : DataFormDataField
{
protected override Control GetControl()
{
if (this.Content != null)
{
return this.Content as Control;
}
return base.GetControl();
}
}
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
// Telerik.Windows.Controls.RadDataForm private void OnCurrentItemPropertyChanged(object sender, PropertyChangedEventArgs e) { if (sender != null) { // this causes the exception when called from non-UI thread // use Dispatcher.Invoke this.IsItemChanged = true; } Available in LIB version: 2017.2.529
Allow the DataFormValidationSummary control to be used outside the context of RadDataForm.
The fix will be available with LIB version 2015.2.817.
Resolved with LIB version 2014.1.602.
Fixed with LIB version 2014.1.0324.