This is a migrated thread and some comments may be shown as answers.

AutogeneratingFields event

2 Answers 86 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 18 Mar 2011, 02:32 PM
How do you control of the order that the fields are added to the form when you choose to autogenerate the fields?

2 Answers, 1 is accepted

Sort by
0
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 19 Mar 2011, 03:06 PM
Add the data annotation "order" to the property of your classes (see below)

i did test it and it does work, alas not all of the data annotations are working if you read this forum a little more.
but again thankfully order does work.

<Display(Name:="Start Date", Description:="Report Starting Date", Prompt:="Start Date", Order:=0)> _
Public Property StartDate() As Nullable(Of Date)
    Get
        Return _StartDate
    End Get
    Set(ByVal value As Nullable(Of Date))
        _StartDate = value
        FirePropertyChanged("StartDate")
    End Set
End Property
Protected _StartDate As Nullable(Of Date) = Nothing

thanks
dco
0
Pavel Pavlov
Telerik team
answered on 21 Mar 2011, 11:12 AM
Hi guys ,

Indeed setting the order attribute is the only way of controlling the order of appearance of data fields in RadDataForm so far .
We are open to any improvement suggestions and in case you have some ideas on other ways it  can be controlled, do not hesitate to make a feature request.

Regards,
Pavel Pavlov
the Telerik team
Tags
DataForm
Asked by
Jeff
Top achievements
Rank 1
Answers by
David Ocasio
Top achievements
Rank 2
Iron
Veteran
Iron
Pavel Pavlov
Telerik team
Share this question
or