Binding bugs in RadLoopingList

9 posts, 1 answers
  1. hosney
    hosney avatar
    7 posts
    Member since:
    Feb 2014

    Posted 15 Mar 2015 Link to this post

    Binding a collection to ItemSource does not work. Only setting it in code behind works.

    When using a template to get the value I can't do something as follows:

    <loopingList:RadLoopingList.ItemTemplate>
       <DataTemplate>
          <TextBox Text="{Binding}" />
       </DataTemplate>
    </loopingList:RadLoopingList.ItemTemplate>

    Instead, I need to bind it to the Item property:

    <loopingList:RadLoopingList.ItemTemplate>
       <DataTemplate>
          <TextBox Text="{Binding Item}" />
       </DataTemplate>
    </loopingList:RadLoopingList.ItemTemplate>

    I believe the first one is the expected behavior in a DataTemplate.
  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 16 Mar 2015 Link to this post

    Hello,

    Thank you for contacting us.

    Currently, the DataContext of each LoopingListItem is of type LoopingListDataItem which holds the associated bussines item in its Item property. So far the RadLoopingList control was used for internal purposes(i.e. for building the RadTimePicker and RadDatePicker). Now, when we released the control we did not want to make breaking changes, so this behavior is expected. I will make sure that such example will be included in our online help. 

    Thank you for your valuable feedback. Please, let me know should you have any other questions or suggestions.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. hosney
    hosney avatar
    7 posts
    Member since:
    Feb 2014

    Posted 16 Mar 2015 in reply to Ivaylo Gergov Link to this post

    What about binding to ItemSource?
  4. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 16 Mar 2015 Link to this post

    Hi,

    I have attached a sample project which is working on our side. Could you please modify it in order to reproduce the issue? 

    I am looking forward to your reply.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. hosney
    hosney avatar
    7 posts
    Member since:
    Feb 2014

    Posted 17 Mar 2015 in reply to Ivaylo Gergov Link to this post

    Funny.. but it doesn't happen to me anymore. I'm not sure if the latest update I got had anything to do with it.

    Anyway I do have another problem where the list does not appear on first load, but appears on subsequent loads. I've modified your example to display this behavior.

    I'm trying to create a time span picker here (since this is missing from the control set). Would be great if you could help out with that!

    <Grid>
            <Button Content="click!">
                <Button.Flyout>
                    <PickerFlyout Placement="Full" ConfirmationButtonsVisible="True">
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <loopingList:RadLoopingList x:Name="HoursList" ItemsSource="{Binding}" ItemWidth="140" ItemHeight="140">
                                <loopingList:RadLoopingList.ItemTemplate>
                                    <DataTemplate>
                                        <Border Width="138" Height="138" BorderThickness="2" BorderBrush="{ThemeResource ButtonDisabledBorderThemeBrush}">
                                            <Grid Margin="6">
                                                <TextBlock Text="{Binding Item}" VerticalAlignment="Center" />
                                                <TextBlock VerticalAlignment="Bottom" FontSize="{ThemeResource ContentControlFontSize}" Text="Hours" />
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </loopingList:RadLoopingList.ItemTemplate>
                            </loopingList:RadLoopingList>
                            <loopingList:RadLoopingList Grid.Column="1" x:Name="MinutesList" ItemsSource="{Binding}" ItemWidth="140" ItemHeight="140">
                                <loopingList:RadLoopingList.ItemTemplate>
                                    <DataTemplate>
                                        <Border Width="138" Height="138" BorderThickness="2" BorderBrush="{ThemeResource PhoneMidBrush}">
                                            <Grid Margin="6">
                                                <TextBlock Text="{Binding Item}" VerticalAlignment="Center" />
                                                <TextBlock VerticalAlignment="Bottom" FontSize="{ThemeResource ContentControlFontSize}" Text="Minutes" />
                                            </Grid>
                                        </Border>
                                    </DataTemplate>
                                </loopingList:RadLoopingList.ItemTemplate>
                            </loopingList:RadLoopingList>
                        </Grid>
                    </PickerFlyout>
                </Button.Flyout>
            </Button>
        </Grid>


    Thanks
  6. Answer
    Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 20 Mar 2015 Link to this post

    Hello,

    It seems that currently the RadLoopingList does not measure properly when its available size is infinity(in case it is placed in scrollviewer or flyout) because it does not have MinWidth and MinHeight. In this case you can set it yourself and it should be working. Also this fill be fixed for our upcoming Service Pack in April.

    Please, let me know if this helps.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. hosney
    hosney avatar
    7 posts
    Member since:
    Feb 2014

    Posted 20 Mar 2015 in reply to Ivaylo Gergov Link to this post

    That's great! Thanks for your help.
  8. Damien
    Damien avatar
    6 posts
    Member since:
    Sep 2012

    Posted 02 Apr 2015 Link to this post

    I downloaded the sample project earlier in this thread and it doesn't work. I get the error TemplateNotAppliedException. I have re-downloaded the SDK and also tried a repair. This happens when adding the control to my own projects as well as the sample project.

    I get the same error/crash in the emulators and a physical Windows Phone 8.1 device.

    Any idea what could be wrong?
  9. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 07 Apr 2015 Link to this post

    Hi Damien,

    So far we do not have any similar known issues. Could you please try to uninstall our product and install it manually from the msi file instead of our control panel? If this does not help please elaborate more on what visual studio do you use or any additional information that could be useful.

    I am looking forward to your reply. 

    Regards,
    Ivaylo Gergov
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
Back to Top