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

Row Style of Inner Grid

5 Answers 103 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 06 Jul 2010, 03:31 PM
My RadGrid has several instances where I use a Row Details Template to have a Grid within a grid (if that makes any sense...). I was hoping the rows of the inner grid would inherit the style of the parent grid, but this doesn't seem to be the case. Even if I define a row style in the XAML markup for my inner grid it still doesn't work. But there is no problme at all with the parent grid. All I want to be able to do is make the background of each row transparent. Does anyone have any suggestions on what I might be doing wrong?

<telerikGrid:RadGridView x:Name="partSearchInfoRadGridView" GridLinesVisibility="Horizontal" AutoGenerateColumns="False" SelectionMode="Multiple" ItemsSource="{Binding partInfoDT}" RowDetailsVisibilityChanged="partSearchInfoRadGridView_RowDetailsVisibilityChanged" 
RowDetailsVisibilityMode="VisibleWhenSelected" RowLoaded="partSearchInfoRadGridView_RowLoaded" ScrollViewer.HorizontalScrollBarVisibility="Hidden"  
Style="{DynamicResource RadGridViewStyleECP}" RowStyle="{DynamicResource GridViewRowStyle}"                                                          
IsSynchronizedWithCurrentItem="False"  SelectionChanged="partSearchInfoRadGridView_SelectionChanged"
 
<telerikGrid:RadGridView.Columns>.... 
 
 
 
 
 
<telerikGrid:RadGridView.RowDetailsTemplate> 
<DataTemplate> 
 
<telerikGrid:RadGridView x:Name="partSearchInfoInnerRadGridView" CanUserFreezeColumns="False" GridLinesVisibility="Horizontal" IsReadOnly="True"  
AutoGenerateColumns="False" Height="200" RowHeight="30" ScrollViewer.HorizontalScrollBarVisibility="Hidden"  
Style="{DynamicResource RadGridViewStyleECP}" RowStyle="{DynamicResource GridViewRowStyle}"  
IsSynchronizedWithCurrentItem="False" RowDetailsVisibilityMode="Collapsed" 
SelectionChanged="partSearchInfoInnerRadGridView_SelectionChanged" 
IsFilteringAllowed="False" ShowGroupPanel="False" > 
 
<telerikGrid:RadGridView.Columns>.... 

5 Answers, 1 is accepted

Sort by
0
Ваня
Top achievements
Rank 1
answered on 06 Jul 2010, 07:32 PM
Hi,Mark


I strongly recommend you to review the demo sample for the RadGridView:Controls->Data->GridView->RowDetails
Read carefully the code-place innergrid inside UserControl-modify the style from there and set the desired properties,
define the RowDetailsTemplate for the parent grid  as it is shown.


Hope this helps!




0
Vlad
Telerik team
answered on 07 Jul 2010, 07:10 AM
Hello Mark,

 Can you send us small example where we can reproduce this strange behavior (not working rows style for grid inside RowDetails)? Can you post more info about the grid version as well?

Sincerely yours,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Mark
Top achievements
Rank 1
answered on 07 Jul 2010, 11:28 AM
I've managed to discover the line of code I needed, I need to set  RowDetailsStyle="{DynamicResource GridViewRowDetailsStyle}"

In my resource dictionary I now need to set this style. I'm having trouble with the target type though, I can't seem to figure out what it should be, I've tried things like "telerik:GridViewRowDetails" (telerik: being the namespace). I have a copy of the OfficeBlack theme files but can't find an example of how set this style from the resource dictionary. Has anyone got an example of how to do this?
0
Accepted
Ваня
Top achievements
Rank 1
answered on 07 Jul 2010, 12:10 PM
Hi,Mark

Accept my apology for my previous suggestion:

try this for the TargetType:

<Style x:Key="GridViewRowDetailsStyle" TargetType="{x:Type telerik:DetailsPresenter}">
         </>


Hope this helps!
0
Mark
Top achievements
Rank 1
answered on 07 Jul 2010, 01:43 PM
Thanks, that was exaclty what I was looking for!
Tags
GridView
Asked by
Mark
Top achievements
Rank 1
Answers by
Ваня
Top achievements
Rank 1
Vlad
Telerik team
Mark
Top achievements
Rank 1
Share this question
or