This is a migrated thread and some comments may be shown as answers.

[Solved] Grid not getting displayed in UI after upgrade

3 Answers 139 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Bhavik
Top achievements
Rank 1
Bhavik asked on 03 Feb 2011, 09:02 PM
Hi,

I recently upgraded my Silverlight controls to 2010.3.1110.1040.

Now when I run the appication, I do not see any of the grids getting displayed in UI. Following is one of the grids:

<telerikGridView:RadGridView x:Name="gridView_Impact_Incidents" Grid.Row="0"
                                                        VerticalAlignment="Stretch"                                                 
                                                        IsReadOnly="true"
                                                        AutoGenerateColumns="False"
                                                        ColumnWidth="*" 
                                                        RowIndicatorVisibility="Collapsed"
                                                        ShowGroupPanel="false"
                                                        IsFilteringAllowed="false"
                                                        IsEnabled="true"
                                                        ScrollViewer.VerticalScrollBarVisibility="Auto"
                                                        Template="{StaticResource RadGridViewTemplate}"
                                                        RowStyle="{StaticResource GridViewRowStyle1}"
                                                        Margin="2" 
                                                        RowLoaded="gridView_Impact_Incidents_RowLoaded"
                                                        >
                           <telerikGridView:RadGridView.Columns>
                               <telerikGridView:GridViewDataColumn Header="TicketID" Width=".1*" CellStyle="{StaticResource GridViewCellStyle1}">
                                   <telerikGridView:GridViewDataColumn.CellTemplate>
                                       <DataTemplate>
                                           <HyperlinkButton Content="{Binding ExternalSystemID}" NavigateUri="{Binding ExternalSystemLink}" TargetName="_blank"></HyperlinkButton>
                                       </DataTemplate>
                                   </telerikGridView:GridViewDataColumn.CellTemplate>
                               </telerikGridView:GridViewDataColumn>
                               <telerikGridView:GridViewDataColumn Header="Incident Description" Width=".55*" DataMemberBinding="{Binding Description}" CellStyle="{StaticResource GridViewCellStyle1}"/>
                               <telerikGridView:GridViewDataColumn Header="Created Date/Time" Width=".2*" DataMemberBinding="{Binding CreatedDate}" CellStyle="{StaticResource GridViewCellStyle1}"/>
                               <telerikGridView:GridViewDataColumn Header="Created By" Width=".15*" DataMemberBinding="{Binding CreatedBy}" CellStyle="{StaticResource GridViewCellStyle1}"/>
                               <telerikGridView:GridViewDataColumn Width="100" CellStyle="{StaticResource GridViewCellStyle1}">
                                   <telerikGridView:GridViewDataColumn.CellTemplate>
                                       <DataTemplate>
                                           <StackPanel Orientation="Horizontal" >
                                               <Button x:Name="cmd_Impact_EditIncident" Content="Edit" Width="45" Click="cmd_Impact_EditIncident_Click"></Button>
                                               <Button x:Name="cmd_Impact_DeleteIncident" Content="Delete" Width="55" Click="cmd_Impact_DeleteIncident_Click"></Button>
                                           </StackPanel>
                                       </DataTemplate>
                                   </telerikGridView:GridViewDataColumn.CellTemplate>
                               </telerikGridView:GridViewDataColumn>
                           </telerikGridView:RadGridView.Columns>
                       </telerikGridView:RadGridView>

Attached are the two screen shots where "BeforeUpgrade.jpeg" shows the same grid getting displayed in UI and "AfterUpgrade.jpeg" shows the same grid not getting displayed in UI.

your help would be appriciated.

Thanks,
Bhavik

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 04 Feb 2011, 07:29 AM
Hello,

 Can you remove the styles temporary to see what will be the result? 

All the best,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Bhavik
Top achievements
Rank 1
answered on 04 Feb 2011, 11:14 PM
Hi,

Yes. you are right. When I removed the style templates, grid started showing on the UI.

However, this is not a workaround as I need to have those style displayed. The style which are used in the grid are defined inside App.xaml under <Appication.Resources>

Following is one of the style which is declared in App.Xaml:

  
  
<ControlTemplate x:Key="RadGridViewTemplate" TargetType="telerikGridView:RadGridView">
           <Border x:Name="PART_MasterGridContainer" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
               <VisualStateManager.VisualStateGroups>
                   <VisualStateGroup x:Name="GridViewActivity">
                       <VisualState x:Name="Idle">
                           <Storyboard>
                               <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                   <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/>
                               </ObjectAnimationUsingKeyFrames>
                           </Storyboard>
                       </VisualState>
                       <VisualState x:Name="Busy">
                           <Storyboard>
                               <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PART_GridViewLoadingIndicator" Storyboard.TargetProperty="Visibility">
                                   <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Visible"/>
                               </ObjectAnimationUsingKeyFrames>
                           </Storyboard>
                       </VisualState>
                   </VisualStateGroup>
               </VisualStateManager.VisualStateGroups>
               <Grid>
                   <Telerik_Windows_Controls_GridView:GridViewItemsControl x:Name="PART_RootItemsControl" Background="{TemplateBinding Background}" ParentRow="{TemplateBinding ParentRow}" ScrollMode="{TemplateBinding ScrollMode}" ShowColumnFooters="{TemplateBinding ShowColumnFooters}" ShowColumnHeaders="{TemplateBinding ShowColumnHeaders}" ShowGroupPanel="{TemplateBinding ShowGroupPanel}" telerik:StyleManager.Theme="{StaticResource Theme}"/>
                   <Telerik_Windows_Controls_GridView:GridViewLoadingIndicator x:Name="PART_GridViewLoadingIndicator" Visibility="Collapsed" telerik:StyleManager.Theme="{StaticResource Theme}"/>
               </Grid>
           </Border>
       </ControlTemplate>


Could you please let me know why these styles are not getting recognized when we use them in Grid ? Also, just as a side note, this is not working since I upgraded to latest version of Telerik Silverlight controls. It was working without any issues with older version of Telerik.

Thanks,
Bhavik
0
Vlad
Telerik team
answered on 07 Feb 2011, 08:33 AM
Hi,

 This style is related to an old grid version (2009 Q2 and below). Please use Blend to extract the grid styles for the latest RadGridView version. 

All the best,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
Bhavik
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Bhavik
Top achievements
Rank 1
Share this question
or