SelectedItem issue

3 posts, 0 answers
  1. Thiago
    Thiago avatar
    16 posts
    Member since:
    May 2012

    Posted 11 Jul 2012 Link to this post

    Hello,
    I´m using the RadSlideView how an ItemTemplate of a Panorama control. Within the RadSlideView, in yours ItemTemplate, I wish to show some charts, by the way, RadCharts. This RadCharts are generated within an usercontrol, because the data will be manipulated with local data and will generate a chart. The ItemsSource of SlideView is an ObservableCollection of the object model that contains all the data needed for generate the chart. In this scenario, it works! A Panorama Item has a RadSlideView, that has some charts to show. The problem is when other chart is chosen, it always return for the first. This way, if I have 3 charts in the RadSlideView, products, sales and customer, the product´s chart is showed, but when I change to sales, it return to product´s chart. Is this behavior a bug of the RadSlideView or am I missing something? 

    Follows the XAML code used:
    <phone:PhoneApplicationPage.Resources>
            <DataTemplate x:Key="SlideItemTemplate">
                <StackPanel>
                    <local:PainelVisaoGrafico Visao="{Binding}" />
                </StackPanel>
            </DataTemplate>
     
            <DataTemplate x:Key="PanoramaHeaderTemplate">
                <TextBlock Text="{Binding PainelJanela}"
                      FontWeight="ExtraBold"
                      FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                      FontSize="60" />
            </DataTemplate>
     
            <DataTemplate x:Key="PanoramaItemTemplate">
                <StackPanel>
                    <telerikPrimitives:RadSlideView x:Name="slideView"
                                       ItemsSource="{Binding Path=Visoes}"
                                       ItemTemplate="{StaticResource SlideItemTemplate}"
                                       Height="520"
                                       Width="420"
                                       SelectionChanged="slideView_SelectionChanged"/>
                </StackPanel>
            </DataTemplate>
     
        </phone:PhoneApplicationPage.Resources>
     
        <!--LayoutRoot contains the root grid where all other page content is placed-->
        <Grid x:Name="LayoutRoot">
            <telerikPrimitives:RadBusyIndicator x:Name="busyIndicator"
                                  AnimationStyle="AnimationStyle1"
                                  Content="Carregando"/>
             
            <controls:Panorama x:Name="pVisoes"
                       Title="{Binding Titulo, ElementName=visualizador}"
                       ItemsSource="{Binding MenuSecundario, ElementName=visualizador}"
                       HeaderTemplate="{StaticResource PanoramaHeaderTemplate}"
                       ItemTemplate="{StaticResource PanoramaItemTemplate}"
                       SelectionChanged="pVisoes_SelectionChanged">
            </controls:Panorama>
        </Grid>

    Here is the slideView SelectionChanged event:

    private void slideView_SelectionChanged(object sender, SelectionChangedEventArgs e)
            {
                var addeds = e.AddedItems;
                var removeds = e.RemovedItems;
     
                if (addeds.Count > 0)
                {
                    var item = addeds[0];
                }
                     
            }

    Here, the item variable takes the selected item correct .

    I don´t know if the problem is the usercontrol that is used to generate charts or the RadSlideView.

    The context of this thread (http://www.telerik.com/community/forums/windows-phone/slideview/slideview---prameter-incorect-exception.aspx) is the same that I´m using, except that the error did not appear.

    I need your help!

    Thanks in advance,

    Thiago
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1511 posts

    Posted 13 Jul 2012 Link to this post

    Hi Thiago,

    Thank you for contacting us. Unfortunately I was unable to reproduce the issue. If possible, could you please send us a sample project reproducing it. This way we would be better able to assist you.

    All the best,
    Kiril Stanoev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Thiago
    Thiago avatar
    16 posts
    Member since:
    May 2012

    Posted 13 Jul 2012 Link to this post

    Hi Kiril,
    I´ve opened a support ticket about this issue.
    Thank you by the orientation.

    Best wishes,

    Thiago
Back to Top