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

RadTileViewItem Error

2 Answers 54 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Aditya
Top achievements
Rank 1
Aditya asked on 15 Jun 2011, 06:45 PM

Hi Telerik Team,

I have an issue of adding RadTileViewItems to RadTileView.

i want to add these programmatically.
What I want  is

1) There r 2 grid ctrls.
2) 1st one contains tileview control.
3) 2nd contains some links as shown in fig.
4) There should be RadExpander, beneath the RadTileView.
5) when i click on a link, a tilevieitem should be newly created and  added to tileview control.

How can i acheieve this?

The design code for this is:


<P><Grid 
x:Name="LayoutRoot"    
<Grid 
x:Name="gridSplitter">
<Grid.ColumnDefinitions><BR>                
<ColumnDefinition 
Width="0.90*"/><BR>                
<ColumnDefinition 
Width="0.10*"/><BR>            
</Grid.ColumnDefinitions><BR>            
<Grid x:Name="GridData" 
Grid.Row="1"><BR>                
<Grid.RowDefinitions><BR>                    
<RowDefinition 
Height="0.80*"/><BR>                    
<RowDefinition 
Height="0.20*"/><BR>                
</Grid.RowDefinitions><BR>                
<telerik:RadTileView x:Name="RadTileViewWidget" Grid.Column="1" 
TileStateChanged="radTileView_TileStateChanged"><BR>                    
<telerik:RadTileViewItem x:Name="radItem1" Header="My 
Items"><BR>                        
<telerik:RadFluidContentControl 
x:Name="radFluidControl"><BR>                            
<telerik:RadFluidContentControl.LargeContent><BR>                                
<Grid 
x:Name="GridInside"><BR>                                    
<Grid.RowDefinitions><BR>                                        
<RowDefinition 
Height="*"/><BR>                                        
<RowDefinition Height="Auto" 
/><BR>                                    
</Grid.RowDefinitions><BR>                                    
<telerik:RadGridView 
x:Name="radGrV"><BR>                                        
<BR>                                    
</telerik:RadGridView><BR>                                    
<StackPanel  Grid.Row="1" 
Orientation="Vertical"><BR>                                        
<telerik:RadExpander Header="My Paramaters" Margin="0" 
BorderBrush="Black"  
BorderThickness="1"><BR>                                            
<Border BorderBrush="Black" BorderThickness="0" 
Margin="9,01,01,01"><BR>                                                
<StackPanel Orientation="Vertical" 
><BR>                                                    
<StackPanel x:Name="spRadExpParam1" Orientation="Horizontal" 
Margin="0,10,0,0"><BR>                                                        
<TextBlock x:Name="txtBlockRadExpFrom" 
Text="From:"/><BR>                                                        
<ComboBox x:Name="canvasDropdownFrom" Margin="10,0,0,0" Width="150" 
Height="25"><BR>                                                            
<ComboBoxItem Content="Paramenter 
1"></ComboBoxItem><BR>                                                            
<ComboBoxItem Content="Paramenter 
2"></ComboBoxItem><BR>                                                            
<ComboBoxItem Content="Paramenter 
3"></ComboBoxItem><BR>                                                        
</ComboBox>                                                       
<BR>                                                    
</StackPanel><BR>                                                    
<StackPanel x:Name="spRadExpParam2" Orientation="Horizontal" 
Margin="0,10,0,0"><BR>                                                        
<TextBlock x:Name="txtBlockRadExpTo" 
Text="To:"/><BR>                                                        
<ComboBox x:Name="canvasDropdownTo" Margin="10,0,0,0" Width="150" 
Height="25"><BR>                                                            
<ComboBoxItem Content="Paramenter 
1"></ComboBoxItem><BR>                                                            
<ComboBoxItem Content="Paramenter 
2"></ComboBoxItem><BR>                                                            
<ComboBoxItem Content="Paramenter 
3"></ComboBoxItem><BR>                                                        
</ComboBox><BR>                                                    
</StackPanel><BR>                                                    
<StackPanel x:Name="spRadExpParam3" Orientation="Horizontal" 
Margin="0,10,0,0"><BR>                                                        
<TextBlock x:Name="txtBlockRadExpParam2" Text="Param2Value: 
"/><BR>                                                        
<TextBox x:Name="txtBoxParma2" Margin="10,0,0,0" 
Text="Param2Value"/><BR>                                                    
</StackPanel></P>
<P>                                                    
<StackPanel x:Name="spRadExpParam4" Orientation="Horizontal" 
Margin="0,10,0,0"><BR>                                                        
<TextBlock x:Name="txtBlockRadExpParam3" Text="Param3Value: 
"/><BR>                                                        
<ComboBox x:Name="canvasDropdownParam2" Margin="10,0,0,0" Background="Blue" 
Width="150" Height="25" Canvas.Top="10" 
Canvas.Left="10"><BR>                                                            
<ComboBoxItem Content="Paramenter 
1"></ComboBoxItem><BR>                                                            
<ComboBoxItem Content="Paramenter 
2"></ComboBoxItem><BR>                                                            
<ComboBoxItem Content="Paramenter 
3"></ComboBoxItem><BR>                                                        
</ComboBox><BR>                                                    
</StackPanel>                                                    
<BR>                                                
</StackPanel><BR>                                            
</Border><BR>                                        
</telerik:RadExpander><BR>                                    
</StackPanel><BR>                                
</Grid><BR>                            
</telerik:RadFluidContentControl.LargeContent><BR>                        
</telerik:RadFluidContentControl><BR>                    
</telerik:RadTileViewItem><BR>                
</telerik:RadTileView><BR>            
</Grid></P>
<P>            <Grid 
x:Name="LeftStaticLink" Grid.Row="1" Grid.Column="2" 
ShowGridLines="True"><BR>                
<StackPanel x:Name="StackPanelLeftApp" Orientation="Vertical"  
VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Auto" 
ScrollViewer.VerticalScrollBarVisibility="Auto"><BR>                    
<TextBlock x:Name="CountUsers" 
Text="app1"></TextBlock><BR>                    
<TextBlock x:Name="GetUsers" 
Text="App2"></TextBlock><BR>                
</StackPanel><BR>                
<!--<TextBlock Name="txtApp" AllowDrop="True" Grid.Column="2" 
Text="Application1" Margin="0,0,0,0" 
Foreground="Blue"></TextBlock><BR>            
<HyperlinkButton Name="hypLinkWidget1" AllowDrop="True" Grid.Column="2" 
Margin="20,20,20,260" 
Content="Widget1"></HyperlinkButton>            
<BR>            
<HyperlinkButton Name="hypLinkWidget2" Grid.Column="2" AllowDrop="True" 
Margin="20,40,20,240" 
Content="Widget2"></HyperlinkButton>--><BR>            
</Grid><BR>        
</Grid>       <BR>    
</Grid></P><BR>

Thanks,
Aditya Reddy.

2 Answers, 1 is accepted

Sort by
0
Accepted
Zarko
Telerik team
answered on 17 Jun 2011, 04:19 PM
Hi Aditya,
I think that the easiest way to achieve this functionality will be to extract the RadTileViewItem content in an user control and on button click add new instance of this user control to the RadTileView.
For further references could you please examine the attached project and see if this is what you want?

Regards,
Zarko
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
Aditya
Top achievements
Rank 1
answered on 20 Jun 2011, 06:34 AM
Hi,
Thanks for your reply.
Tags
TileView
Asked by
Aditya
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Aditya
Top achievements
Rank 1
Share this question
or