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

RadGrid inside ItemTemplate

1 Answer 155 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Gang Xue
Top achievements
Rank 1
Gang Xue asked on 19 Aug 2008, 03:39 PM
Hi,

Is it possible to place a RadGrid inside a RadPanelItem? I tried to insert a RadGrid into the ItemTemplate but that will always bring a compiling error claiming that the RadGrid is not defined.

The xml I used is as follows:

<telerik:RadPanelBar ID="RadPanelBar1" runat="server" Skin="Outlook">

<Items>

<telerik:RadPanelItem Text="Browser">

<ItemTemplate>

<

telerik:RadGrid ID="RadGrid1" runat="server" ... >

</telerik:RadGrid>

</

ItemTemplate>

</

Items>

</

telerik:RadPanelItem>

Thanks.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 20 Aug 2008, 10:53 AM
Hi,

It is possible to place any control in the ItemTemplate of a RadPanelItem. Have you set the DataSource for the Grid?

This is what I tried on my end and it is working fine:
 <telerik:RadPanelBar ID="RadPanelBar1"  runat="server" Skin="Hay" > 
         
         <Items> 
           <telerik:RadPanelItem Text="Panel1">  
            <ItemTemplate> 
            <telerik:RadGrid ID="RadGrid2" AutoGenerateColumns="true" DataSourceID="SqlDataSource1" runat="server">  
            </telerik:RadGrid> 
          </ItemTemplate> 
        </telerik:RadPanelItem> 
      </Items> 
  </telerik:RadPanelBar> 


Princy.
Tags
PanelBar
Asked by
Gang Xue
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or