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

show 2 panels inside RADGRID on same level

4 Answers 112 Views
Grid
This is a migrated thread and some comments may be shown as answers.
naimish
Top achievements
Rank 1
naimish asked on 02 Aug 2010, 12:03 PM
Hi All, 


Is it possible to show to asp panels inside <NestedViewTemplate> of RADGRID, so that one panel should bind with one data source
 and another panel should show bind with another data source.


Ex: <telerik:RadGrid ID="RadGrid1" runat="server" onneeddatasource="RadGrid1_NeedDataSource"  >
            
        
        <HeaderContextMenu EnableAutoScroll="True"></HeaderContextMenu>

        <MasterTableView AutoGenerateColumns="False" CellSpacing="1"  CommandItemDisplay="Top" DataKeyNames="T_ID" GridLines="Vertical"
        PagerStyle-Mode="NextPrevAndNumeric"   />
               
             <NestedViewTemplate>

   <asp:Panel ID="panel1" runat="server" BorderStyle="Solid" BorderWidth="2px" >
                     <telerik:RadListView ID="RadListView1" runat="server"  DataSourceID="ObjectDataSource1"
                        ItemPlaceholderID="ParentContainer" >
                        </telerik:RadListView>
                    </asp:Panel>


           <asp:Panel ID="panel2" runat="server" BorderStyle="Solid" BorderWidth="2px" >                    
                     
                       <telerik:RadListView ID="RadListView2" runat="server"  DataSourceID="ObjectDataSource2"
                       ItemPlaceholderID="ParentContainer" >
        </telerik:RadListView>                   
                   </asp:Panel>
                     
             </NestedViewTemplate>

</MasterTableView>
        </telerik:RadGrid>

Or how can i achieve same  thing from any other alternative.

Currently i am refering http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplatedeclarativerelations/defaultcs.aspx, but in my case i need 2 panels.

4 Answers, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 05 Aug 2010, 11:52 AM
Hello Naimish,

Into the RadGrid's NestedVIewTemplate you could add two panels bound to different data source controls. I am sending you a simple example which demonstrates the desired functionality.

Greetings,
Radoslav
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
naimish
Top achievements
Rank 1
answered on 05 Aug 2010, 12:10 PM
Hi,

Is it possible to use two NestedViewSettings, one for on RADListView and one for another RADListView, as i am using object data source
(web service).
What will be the DetailKeyField and MasterKeyField values ,where i need to define these properties, if i am not using NestedViewSettings. 


Note: Both web methods take same parameters, but one gives services list and another some other field data. 
<NestedViewSettings DataSourceID= "ObjectDataSource1" >
                           <ParentTableRelation>
                                  <telerik:GridRelationFields DetailKeyField="RSid" MasterKeyField="R_SID" />
                           </ParentTableRelation>
                       </NestedViewSettings>  

<NestedViewSettings DataSourceID= "ObjectDataSource2" >
                           <ParentTableRelation>
                                  <telerik:GridRelationFields DetailKeyField="Sid" MasterKeyField="_SID" />
                           </ParentTableRelation>
                       </NestedViewSettings>  

0
Accepted
Radoslav
Telerik team
answered on 10 Aug 2010, 10:13 AM
Hello Naimish,

You could not add more than one NestedViewSettings. In order to achieve the desired functionality you could add a labels, which are invisible, into the panel controls placed in the NestedViewTemplate and get the selected parameters for the datasource controls from these labels. Example of this approach could be found on the following online example:
http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/nestedviewtemplate/defaultcs.aspx

I hope this helps.

Regards,
Radoslav
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
naimish
Top achievements
Rank 1
answered on 10 Aug 2010, 10:38 AM
Hi,

I resolved the issue by putting to panels inside NestedViewTemplate, and defined two datasources inside panel for tw0 RadListViews.

Thanks for help

Tags
Grid
Asked by
naimish
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
naimish
Top achievements
Rank 1
Share this question
or