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

Dynamic Style Silverlight RadGridView

0 Answers 51 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.
Gaurav
Top achievements
Rank 1
Gaurav asked on 01 Mar 2012, 09:25 AM
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
Tags
GridView
Asked by
Gaurav
Top achievements
Rank 1
Share this question
or