New build doesn't show [Display] Attribute

8 posts, 2 answers
  1. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 28 Mar 2011 Link to this post

    Hi;

    I just download the new hot fix and installed it. My controls version show as: 2011.1.328.1040
    I then went to a "ReadOnlyTemplate" and removed the first "Label" to see if the Label will be picked up from the [Display] attribute and it did not:
    <telerik:DataFormDataField DataMemberBinding="{Binding Acct_Name,Mode=TwoWay}"  IsEnabled="False" />

    Then I changed it to customize it's content as following and still did not show the label:
    <telerik:DataFormDataField DataMemberBinding="{Binding Acct_Name,Mode=TwoWay}"  IsEnabled="False" >
            <telerik:DataFormDataField.Content>
                    <TextBox Text="{Binding Acct_Name}" />
            </telerik:DataFormDataField.Content>
    </telerik:DataFormDataField>
    Am I missing something? Could you please how to use the attributes?
    Thanks!
    ..Ben

  2. Answer
    Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 30 Mar 2011 Link to this post

    Hi Ben ,
    Attributes will be respected only when autogenerating fields.
    When setting the fields manually , the developer has the whole power  and freedom to adjust what and how is displayed.

    Kind regards,
    Pavel Pavlov
    the Telerik team
  3. DevCraft banner
  4. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 30 Mar 2011 Link to this post

    Ah I see. In my case, because of some of the forms have many fields I have to use tab to break them down like the attach screen shot and therefore manage it manually. And that's why I can't use Autogen.

    Thanks!
  5. Answer
    Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 30 Mar 2011 Link to this post

    Hi Ben ,

    Actually this brings us to another point - you say you need to separate fields. Our short term plans for RadDataForm include introducing a field grouping functionality . The grouping data annotations attributes would also be respected. I can not commit to a specific release date, however it will be introduced soon .

    Regards,
    Pavel Pavlov
    the Telerik team
  6. Ben Hayat
    Ben Hayat avatar
    892 posts
    Member since:
    May 2008

    Posted 30 Mar 2011 Link to this post

    Pavel, the grouping feature will solve a big problem related to screen real-estate and grouping related fields together. I had asked the Telerik team to provide GroupBox control for the grouping of related data on a large area. But sometime you don't have a large area, like in the screen shot where you have grid. So, you have to do it with tabs.
    Please be sure to take this point into consideration or give us a choice of tab or groupbox or something else as container.
    Thanks!
  7. David Ocasio
    David Ocasio avatar
    147 posts
    Member since:
    Nov 2009

    Posted 25 Aug 2011 Link to this post

    not displaying/regarding display attribute for non-autogenerated fields
    is actually different then the behavior of the toolkit dataform

    While you are correct i can add the label and information seciton to the template myself.
    i prefer to leave them as attributes in the dataclass

    I do not use the autogenerated template since i like to control the type of control being used (textbox, dropdown) etc.
    But the label and inforamtion stuff can be handled and should be handled by the dataform.

    you might reconsider at least duplicating the behavior of the toolkit dataform

    just an opinion
    dco
  8. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 31 Aug 2011 Link to this post

    Hi David Ocasio,

    We have already reconsidered this and the feature is on its way to release . In case it does not make it for the service pack  next month , it will surely be present in the next official release.

    All the best,
    Pavel Pavlov
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  9. David Ocasio
    David Ocasio avatar
    147 posts
    Member since:
    Nov 2009

    Posted 31 Aug 2011 Link to this post

    great news

    thanks pavel
    dco
Back to Top
DevCraft banner