Dynamic Style Silverlight RadGridView

1 posts, 0 answers
  1. Gaurav
    Gaurav avatar
    1 posts
    Member since:
    Nov 2011

    Posted 01 Mar 2012 Link to this post

    Hi ,

    I am Assigning Dynamic styles through Properties to Radgrid in silverlight. it is displaying all styles ratter than the HeaderCellStryle .

    Following is the Piece of Code i am using .
    Could anyone suggest Solution its is working for alternate row and simple Row.

     <telerik:RadGridView x:Name="lbScheduledList" Visibility="{Binding Path=scheduleListVisibility}"  Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Auto"  AlternationCount="2" Padding="0,5,0,5"
                                      ScrollViewer.HorizontalScrollBarVisibility="Hidden"  HorizontalAlignment="Right"    VerticalAlignment="Top" SelectedItem="{Binding Path=selectedScheItem,Mode=TwoWay}"
                                      ShowInsertRow="False" ShowColumnFooters="False" ShowGroupPanel="False" IsReadOnly="True" CanUserInsertRows="False" CanUserDeleteRows="False"
                                     CanUserFreezeColumns="False"  GridLinesVisibility="None" BorderThickness="0"
                                      CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserResizeRows="False" CanUserSelect="True" CanUserSortColumns="False"  
                                       IsFilteringAllowed="False" SelectionMode="Single" ShowGroupFooters="False"  AutoGenerateColumns="False"   RowIndicatorVisibility="Collapsed" ItemsSource="{Binding Path=scheduleItems}"
                                           AlternateRowStyle="{Binding Path=DataContext.GridAlterRowStyle,ElementName=DashBoardPage}" RowStyle="{Binding Path=DataContext.GridMainRowStyle,ElementName=DashBoardPage}"                  
                                                         >
                                            <telerik:RadGridView.Resources>
                                                <Views:ActualSizePropertyProxy Element="{Binding ElementName=lbScheduledList}" x:Name="lbScheduledListActualWidth" />
                                            </telerik:RadGridView.Resources>
                                            <telerik:RadGridView.Columns>
                                                <telerik:GridViewDataColumn Header="Start Date"  HeaderCellStyle="{Binding Path=DataContext.GridViewCellStyle,ElementName=DashBoardPage}"  DataMemberBinding="{Binding StartDate,StringFormat=MM/dd/yyyy}" Width=".20*">
                                                   

                                                </telerik:GridViewDataColumn>
                                                
                                                <telerik:GridViewDataColumn Header="End Date"  HeaderCellStyle="{Binding Path=DataContext.GridViewCellStyle,ElementName=DashBoardPage}" DataMemberBinding="{Binding EndDate,StringFormat=MM/dd/yyyy}" Width=".20*"/>
                                                <telerik:GridViewDataColumn Header="Title"  HeaderCellStyle="{Binding Path=DataContext.GridViewCellStyle,ElementName=DashBoardPage}"   DataMemberBinding="{Binding ItemTitle}" Width=".60*" />
                                            </telerik:RadGridView.Columns>
                                        </telerik:RadGridView>


    Thanks
    Gaurav bhardwaj
Back to Top