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

RadPanelBar inside ListView

1 Answer 30 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Pablo
Top achievements
Rank 1
Pablo asked on 04 Sep 2008, 08:28 PM
$0Hello, I am trying to pull some datafrom a database and then display it in the form of a RadPanelBar.$0$0My firstthought was to use a ListView, so I went for this approach:$0$0$0$0$0$01$0$0$0$0<asp:ListView ID="LVGraficas" runat="server" DataKeyNames="IdGrafica"   $0$0$0$0$0$02$0$0$0$0    DataSourceID="ObjectDataSource1" ItemPlaceholderID="AquiVanItems">  $0$0$0$0$0$03$0$0$0$0    <LayoutTemplate> $0$0$0$0$0$04$0$0$0$0        <telerik:RadPanelBar ID="RadPanelBar12" runat="server" Width="300px"   $0$0$0$0$0$05$0$0$0$0            EnableEmbeddedSkins="False" Skin="Rojo"$0$0$0$0$0$06$0$0$0$0            <CollapseAnimation Type="Linear" Duration="100"></CollapseAnimation> $0$0$0$0$0$07$0$0$0$0            <ExpandAnimation Type="Linear" Duration="100"></ExpandAnimation> $0$0$0$0$0$08$0$0$0$0      $0$0$0$0$0$09$0$0$0$0                <Items> $0$0$0$0$0$010$0$0$0$0                    <asp:PlaceHolder ID="AquiVanItems" runat="server"></asp:PlaceHolder> $0$0$0$0$0$011$0$0$0$0                </Items> $0$0$0$0$0$012$0$0$0$0        </telerik:RadPanelBar> $0$0$0$0$0$013$0$0$0$0    </LayoutTemplate> $0$0$0$0$0$014$0$0$0$0    <ItemTemplate> $0$0$0$0$0$015$0$0$0$0        <telerik:RadPanelItem runat="server" Text='<%#Eval("Titulo")%>' Selected="True" Expanded="True">  $0$0$0$0$0$016$0$0$0$0            <Items> $0$0$0$0$0$017$0$0$0$0                <telerik:RadPanelItem runat="server" Height="237px"  $0$0$0$0$0$018$0$0$0$0                            Width="300px"$0$0$0$0$0$019$0$0$0$0                               <ItemTemplate>   $0$0$0$0$0$020$0$0$0$0                                    <div style="padding-bottom:55px;">  $0$0$0$0$0$021$0$0$0$0                                        <%#Eval("TextoPie")%> $0$0$0$0$0$022$0$0$0$0                                    </div> $0$0$0$0$0$023$0$0$0$0                               </ItemTemplate> $0$0$0$0$0$024$0$0$0$0                            </telerik:RadPanelItem> $0$0$0$0$0$025$0$0$0$0            </Items> $0$0$0$0$0$026$0$0$0$0        </telerik:RadPanelItem> $0$0$0$0$0$027$0$0$0$0    </ItemTemplate> $0$0$0$0$0$028$0$0$0$0</asp:ListView> $0$0$0$0$0$0$0Look at line 10 above:$0<asp:PlaceHolder ID="AquiVanItems"runat="server"></asp:PlaceHolder>$0$0Exactly at that line, I get this error:$0$0Parser Error Message: Telerik.Web.UI.RadPanelItemCollection must have items of type'Telerik.Web.UI.RadPanelItem'. 'asp:PlaceHolder' is of type'System.Web.UI.WebControls.PlaceHolder'.$0$0I understand that radpanelitemcollection iswaiting for radpanelitem items, but we are inside a ListView LayoutTemplate.$0$0Is there any way to avoid this??$0$0Or any other suggestion to do what I want?$0$0Help would be greatly aprecciated! $0

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 05 Sep 2008, 07:55 AM
Hello Pablo,

In the Items tag you can place only RadPanelItem.

I suggest you achieve the desired task by using Templates.

For example:

<Items> 
  <telerik:RadPanelItem> 
    <ItemTemplate> 
    <asp:PlaceHolder ID="Placeholder1" runat=server></asp:PlaceHolder> 
   </ItemTemplate> 
  </telerik:RadPanelItem> 
</Items> 


Kind regards,
Rosi
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
PanelBar
Asked by
Pablo
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or