Leos

1) Is possible in customized DataForm use other component than DataFormXxxField? For example Image. How? I tested TextBlock but data in Text property did not displayed (binded?).
2) How to change width of Label?
3) What is Mode property ? Possible values are AddNew, Edit, ReadOnly.
4) I need to place READONLY item, for example ID field. I need to have this field ReadOnly in ALL modes, including Edit mode. I tested IsReadOnly (see code bellow) but in Edit mode I can .still modify this field. Because here is not somehing as "DataFormTextBlockField" (and I dont know how to create it - point 1) I dont see any way how to solve it. Note that I have set attribute Editable to false too.

5) Will be nice to use Display.Name attribute for Label ( in AutoGeneratedFields Mode ), but this was already answered yesterday.
6) Does exist some way how to access/bind attributes in customized mode? For example how to bind Label to attribute Display.Name, or to show Description the same way how it is worked in AutoGenerate mode.
7) When user moves with TAB key then Label (?) has probably TabStop set to true, because to move to next field two TABs are needed.

Note: customized = AutoGenerateFields set to false and content is readed from specified DataTemplate.

The templates allow you to define the composition of the form. (there are three of them). The template allows to define whatever length you want the fields to have. It also allows you to do with tabbing whatever it is you want it to do. As for attributes, i suppose you can't have it both ways, if you define your own layout, your display attribute would not be taken into account. The other attributes (for example validation) would probably still be taken into account.

I hope this helps you.... took me long enough to figure it out ;o)

Answer

Pavel Pavlov

Directly on your questions: 1) Is possible in customized DataForm use other component than DataFormXxxField? For example Image. How? I tested TextBlock but data in Text property did not displayed (binded?).

In case you need to place and bind arbitrary control ( other than DataFormFileld) , you need to defne and set one or all of the 3 templates : ReadOnlyTemplate, EditTemplate, NewItemTemlate.
Inside the template you may place a textbox or an image and the binding should look like :
<TextBox Text={Binding CurrentItem.MyProperty}/>*Please have in mind that this is valid for the beta only .We have decided to change this to <TextBox Text={Binding MyProperty}/> as this is more intuitive.

2) How to change width of Label?
For the beta version there is MinWidth of 200 px set for the label . For the official version this is going to be removed and some additional properties to control the label appearance should be introduced.

3) What is Mode property ? Possible values are AddNew, Edit, ReadOnly.This property indicates what mode is the DataForm using at the moment e.g. if the user presses the Edit button , RadDataForm enters Edit mode and the Edit template is applied.

4) I need to place READONLY item, for example ID field. I need to have this field ReadOnly in ALL modes, including Edit mode. I tested IsReadOnly (see code bellow) but in Edit mode I can .still modify this field. Because here is not somehing as "DataFormTextBlockField" (and I dont know how to create it - point 1) I dont see any way how to solve it. Note that I have set attribute Editable to false too.

You can place a TextBlock the way described in point 1.6) Does exist some way how to access/bind attributes in customized mode? For example how to bind Label to attribute You can only set these directly ( can not bind ) as the DataContext does not yet expose attributes info.

7) When user moves with TAB key then Label (?) has probably TabStop set to true, because to move to next field two TABs are needed.This sounds like a bug and is going to be addressed immediately.

In addition : Thankyou for the interest and the questions for RadDataForm . I am treating this post as a valuable beta version feedback and I am updating your Telerik points.

In case you find anything else which needs an improvement or a fix , do not hesitate to contact me .

Kind regards,
Pavel Pavlov
the Telerik team

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!

Leos

I have one more question. I need to submit data immediatelly when user commits with "OK" button.
Note: this is idea (or better to say usual practice) of our customer, application is on intranet so there is not performance problem.
This is working fine with editing, because here is EditEnded event where I can call SubmitChanges().
But what about delete? Here does exist DeletingItem event only but record is deleted after it.
I found one way - using event CurrentItemChanged. But will be better to have DeletedItem event or something similar.
I have also one idea - property ConfirmDelete and delete confirmation. If will be this property set to true, then DataForm will be set to similar mode as is EDIT mode and user must press OK to confirm deleting or Cancel to reject.

Best regards,
Leos

Pavel Pavlov

Thanks again for getting back to us! Your feedback is being directly taken in concern and the event requested has been added to the API of RadDataForm.
This will ba available in the official version coming next week.
I am updating your Telerik points.
Regarding the confirmation dialog. We need some time to clear the concept of how to provide an easy and flexible way to the user for this one.

All the best,
Pavel Pavlov
the Telerik team

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!

Leos

please don't forget to add HeaderTemplate.
Will be also fine to have some example how to modify visual frontend of DF.
For example how to add custom buttons or move OK+CANCEL up, to main toolbar .
Thanks.
Leos

Pavel Pavlov

I am not sure we are going to add a header template property. Here are some details :
the Header property is an object ( not a string) . This means that except the standard header being a string , you may also place there an arbitrary UI element . This to a high extent makes the presence of such property obsolete.

Regarding your second query - you are absolutely right , such article/ example is needed , an I am going to take care for it .

Greetings,
Pavel Pavlov
the Telerik team

Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!

Rupert Henson

I just upgraded to RadControls v2011_1_0411 (from v2011_1_0315 previously) in order to get the handy LabelStyle property for the RadDataForm, but in doing so I've found that the RadDataForm's Mode property is now read-only ?

I'm using RadDataForm in a RadWindow, which I open in either Edit existing or Add New mode, so I need to set the mode in the constructor of the window based on a passed indicator, but that seems to be no longer possible (?).

Previously I used to be able to:-

If bNewMode Then

Me.DataForm1.Mode = Data.DataForm.RadDataFormMode.AddNew

Me.Header = "Add New Template..."

Else

Me.DataForm1.Mode = Data.DataForm.RadDataFormMode.Edit

Me.Header = "Edit Template..."

End

If

But now it's changed to a Dependency property so I tried the following:-

But this fails at runtime, complaining about ModeProperty being read-only.

Is there some other way I can change between Edit and AddNew modes of the RadDataForm at runtime as I used to be able to? (I do not supply the built in control action buttons for the user to select to add new or edit existing).

Pavel Pavlov

Please excuse us for the inconvenience. We needed to avoid some discrepancies and also make the API compliant with the one of the MS Toolkit DataForm .

You still have the control over the mode in RadDataForm by calling the respective methods - e.g. to enter edit mode - you need to call he BeginEdit() method. To enter thew insert mode - call the AddNew method etc.

Sincerely,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Vanya Pavlova

You may always predefine the template of RadDataForm and change it in the way you need.
If you want to read more about RadDataForm's styling, please follow this link.

Best wishes,
Vanya Pavlova
the Telerik team

Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.