Data Template

5 posts, 1 answers
  1. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 30 Mar 2011 Link to this post

    I have interesting problem.

    In my DataTemplate I have:
    <!-- DataFormDataField only -->
    <telerik:DataFormDataField Grid.Row="0" Label="Kód:" Margin="2"
    DataMemberBinding="{Binding CisMater, Mode=TwoWay}"/>
    <!-- DataFormDataField with content -->
     <telerik:DataFormDataField Grid.Row="1" Label="Název:" Margin="2" >
          <TextBox Text="{Binding NazevMater, Mode=TwoWay}"  IsReadOnly="True"/>
    </telerik:DataFormDataField>

    When my form is loaded, I see value in first field (CisMater) but second field (NazevMater) is empty (both values in entity are not null and are not empty). Dataset has more records, so I can move to next record - this second record is displayed correctly (both fields). When I move back to first record, now I see both values too.

    My source is RadDomainDataSource, RadDataForm:
    <telerik:RadDataForm Grid.Row="1"
           Header="Produkty"
           AutoGenerateFields="false"
           CommandButtonsVisibility="All"
           ReadOnlyTemplate="{StaticResource detail}"
           EditTemplate="{StaticResource detail}"
           NewItemTemplate="{StaticResource detail}"
           DeletedItem="RadDataForm_DeletedItem"               
           EditEnded="RadDataForm_EditEnded"
           ItemsSource="{Binding DataView, ElementName=ProduktyDataSource}" />

    Because this is based on my older code, probably this was changed in final version and in beta worked. But I am not sure.
  2. Answer
    Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 04 Apr 2011 Link to this post

    Hello Leos,

    Thank you for reporting this issue.
    We were able to reproduce it but we need more time to investigate what is causing it. We will notify you as soon as we have more information.

    Please, excuse us for the inconvenience caused.
     
    Kind regards,
    Yordanka
    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
  3. DevCraft banner
  4. Louis Bouchard
    Louis Bouchard avatar
    94 posts
    Member since:
    Feb 2010

    Posted 15 Apr 2011 Link to this post

    Same problem for me.  And I need beacuse I have to place the textbox near the label.
  5. Leos
    Leos avatar
    57 posts
    Member since:
    Jul 2010

    Posted 16 Apr 2011 Link to this post

    Louis,
    workaround is described (both answer and example) here:
    http://www.telerik.com/community/forums/silverlight/data-form/easy-application-with-raddataform.aspx

    Most important part is add it (TextBox, TextBlock) to ContentTemplate.

    Telerik added LabelStyle (in DataFormXField) into internal build, I hope that you can modify width of Label here.
    If you have commercial license you can download this internal build (I am still in trial phase but I am sure that Telerik wins) .

    Leos
  6. Louis Bouchard
    Louis Bouchard avatar
    94 posts
    Member since:
    Feb 2010

    Posted 16 Apr 2011 Link to this post

    it's working.  Thanks a lot!
Back to Top
DevCraft banner