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

Textblock in RowDetailsTemplate in Grid does not show while other controls do

7 Answers 51 Views
GridView
This is a migrated thread and some comments may be shown as answers.
KocSistem
Top achievements
Rank 1
KocSistem asked on 18 Aug 2010, 09:19 AM
Hello,

I have come up with an issue or maybe not i dunno but  i think i miss something, my problem is simple, i have a GridView and it includes RowDetailsTemplate which is another UserControl in my project.The issue is, in my RowDetailsTemplate there are TextBlocks just as used in Telerik examples, but they are not shown when DetailTemplate expands. on the other hand i tried to put some other usercontrols like a border and slider, they do shown when DetailTemplate expands. Here is my code:


The main GridView control, as you see, i used StaticResource for RowDetailsTemplate:
<Controls:RadGridView Name="grdPlayerScreens" CanUserFreezeColumns="False"  Grid.Row="2" RowDetailsVisibilityMode="VisibleWhenSelected" RowDetailsTemplate="{StaticResource ScreenConfigEditDetailsTemplates}" AutoGenerateColumns="False" EnableColumnVirtualization="False" ScrollMode="RealTime" IsReadOnly="True" RowIndicatorVisibility="Collapsed">
  <Controls:RadGridView.Columns>
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.Power" Header="Power" />
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.Volume" Header="Volume" />
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.Brightness" Header="Brightness" />
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.Contrast" Header="Contrast"/>
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.Color" Header="Color" />
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.Sharpness" Header="Sharpness"/>
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.BackLight" Header="BackLight" />
     <Controls:GridViewDataColumn UniqueName="RSScreenConfig.PictureMode" Header="Picture Mode"/>
     <Controls:GridViewDataColumn UniqueName="RSSourceType.PortName" Header="Port"/>
     <Controls:GridViewDataColumn UniqueName="RSSourceType.SourceName" Header="Source"/>
  </Controls:RadGridView.Columns>
</Controls:RadGridView>
 

And here is my RowDetailsTemplate UserControl:

<UserControl x:Class="xxx.UserControls.ScreenConfigEditDetailsTemplate"
    mc:Ignorable="d"
    Width="Auto" Height="100">
  
    <Grid x:Name="detailsGrid" Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="15*"/>
            <ColumnDefinition Width="20*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="33*"/>
            <RowDefinition Height="33*"/>
            <RowDefinition Height="33*"/>
        </Grid.RowDefinitions>
        <Border BorderThickness="3" CornerRadius="5" BorderBrush="Black">
        <TextBlock x:Name="the text is not shown" Text="the text is not shown" Height="25" Width="250" FontSize="14" Grid.Row="0" Grid.Column="0"/>
        </Border>
        <TextBlock Text="the text is not shown" Height="25" Width="250" FontSize="14" Grid.Row="1" Grid.Column="0"/>
        <Slider Value="{Binding RSScreenConfig.Volume}" Grid.Row="1" Grid.Column="1" MinWidth="100" LargeChange="10" Maximum="100" Minimum="1" SmallChange="1" />
    </Grid>
</UserControl>

Am i missing something? Please help.

Thanks.
 

7 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 18 Aug 2010, 09:26 AM
Hi KOCSISTEM BILGI VE ILETISIM HIZMETLERI A.S,

You have a grid. You have said that the first TextBlock is in the first column and first row. You then have surrounded it with a border. You can't do things like that. If you want the text block to be a inside a border, then you must place this border to be in the first column and first row of the grid.

Please, read this.

All the best,
Ross
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
KocSistem
Top achievements
Rank 1
answered on 18 Aug 2010, 09:30 AM

<

 

 

UserControl x:Class="PixAgeWebAdmin.UserControls.ScreenConfigEditDetailsTemplate"

 

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

 

xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

 

 

 

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

 

 

 

mc:Ignorable="d"

 

 

 

Width="Auto" Height="100">

 

 

 

 


<
Grid x:Name="detailsGrid" Background="White">

 

 

 

 

    <Grid.ColumnDefinitions>

 

 

 

 

        <ColumnDefinition Width="15*"/>

 

 

 

 

        <ColumnDefinition Width="20*"/>

 

 

 

 

    </Grid.ColumnDefinitions>

 

 

 

 

    <Grid.RowDefinitions>

 

 

 

 

        <RowDefinition Height="33*"/>

 

 

 

 

        <RowDefinition Height="33*"/>

 

 

 

 

        <RowDefinition Height="33*"/>

 

 

 

 

    </Grid.RowDefinitions>

 

 

 

 

    <Border BorderThickness="3" CornerRadius="5" BorderBrush="Black" Grid.Row="0" Grid.Column="0">

 

 

 

 

        <TextBlock x:Name="txtaaa" Text="{Binding RSScreenConfig.Volume}" Height="25" Width="250" FontSize="14"/>

 

 

 

 

    </Border>

 

 

 

 

    <TextBox Text="{Binding RSScreenConfig.Volume}" Grid.Column="1"></TextBox>

 

 

 

 

 

    </Grid>

 

    </

 

 

UserControl>

 


Changed my code like this, and nothing changed, textblock do not shown but the textbox is shown and also gets the binded value. Even without the border when i place the textblock to some cell in Grid the text is not shown.
0
Rossen Hristov
Telerik team
answered on 18 Aug 2010, 09:32 AM
Hi KOCSISTEM BILGI VE ILETISIM HIZMETLERI A.S,

When you place your UserControl is something completely unrelated to Telerik RadControls for Silverlight, does your TextBlock show?

Regards,
Ross
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
KocSistem
Top achievements
Rank 1
answered on 18 Aug 2010, 09:37 AM
Yes it does, i added the whole usercontrol as a main control not a RowDetailTemplate and every textblock is shown.
0
KocSistem
Top achievements
Rank 1
answered on 18 Aug 2010, 09:39 AM
By the way i'm using Telerik 2009 Q3 user controls, and can not upgrade due to compatability issues of other developed projects.
0
Rossen Hristov
Telerik team
answered on 18 Aug 2010, 09:45 AM
Hi KOCSISTEM BILGI VE ILETISIM HIZMETLERI A.S,

In this case, could you please open a separate support ticket and send us a sample project. We will examine it and see what is going wrong. Thanks in advance.

All the best,
Ross
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
KocSistem
Top achievements
Rank 1
answered on 18 Aug 2010, 09:47 AM
Right away, thanks.
Tags
GridView
Asked by
KocSistem
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
KocSistem
Top achievements
Rank 1
Share this question
or