AutogeneratingFields event

3 posts, 0 answers
  1. Jeff
    Jeff avatar
    1 posts
    Member since:
    Jul 2012

    Posted 18 Mar 2011 Link to this post

    How do you control of the order that the fields are added to the form when you choose to autogenerate the fields?
  2. David Ocasio
    David Ocasio avatar
    169 posts
    Member since:
    Nov 2009

    Posted 19 Mar 2011 Link to this post

    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)
            Return _StartDate
        End Get
        Set(ByVal value As Nullable(Of Date))
            _StartDate = value
        End Set
    End Property
    Protected _StartDate As Nullable(Of Date) = Nothing

  3. Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 21 Mar 2011 Link to this post

    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.

    Pavel Pavlov
    the Telerik team
Back to Top