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

[Solved] dynamically create detailsviews

3 Answers 101 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saadettin
Top achievements
Rank 1
Saadettin asked on 21 May 2013, 11:59 AM
Hi. i have a telerik grid like below.

 <telerik:RadGrid Skin="Windows7" ID="grdRubrikOgrencileri" EnableEmbeddedScripts="true" 
                runat="server" Width="84%"  ShowStatusBar="true"  Visible="true" 
                AutoGenerateColumns="False" style = "float:right;" 
                PageSize="1000" AllowSorting="True"
                OnDataBound="grdRubrikOgrencileri_DataBound"
                OnNeedDataSource="grdRubrikOgrencileri_NeedDataSource"
                GridLines="None">
                <PagerStyle Mode="NumericPages"></PagerStyle>
                <MasterTableView Width="100%" DataKeyNames="DegTipIliskiID" ForeColor="Maroon" AllowMultiColumnSorting="True" HierarchyDefaultExpanded="true" CommandItemStyle-HorizontalAlign="Justify" FilterItemStyle-HorizontalAlign="Center">
                <Columns>
                <telerik:GridBoundColumn SortExpression="DegTipIliskiID" HeaderText="DegTipIliskiID"
                            Visible="false" DataField="DegTipIliskiID">
                 </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="DegerlendirmeTipiID" HeaderText="DegerlendirmeTipiID"
                            Visible="false" DataField="DegerlendirmeTipiID">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn SortExpression="DegerlendirmeTipi" HeaderText="DegerlendirmeTipi"
                            DataField="DegerlendirmeTipi">
                        </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
       </telerik:RadGrid>

Now, I want to add two detailstables inside to this grid as dynamically.  How can I achieve this? Can someone give me an idea?

I added a photo about what i want to do. If you look at photo, there is a red bordered part. This part must load dynamically. This is what i try to do. 

Thanks in avance.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 May 2013, 06:28 AM
Hi Saadettin,

Please Note:
RadGrid does not support mixing declarative grid columns with grid columns added dynamically at runtime. 
You should either create all the columns in the grid programmatically, or else define them all in the ASPX file.
This documentation will help you how to create grid programatically.

Thanks,
Princy
0
Saadettin
Top achievements
Rank 1
answered on 22 May 2013, 07:14 AM
Ok. I want to ask one more question. I want to show detail table's columns side to side, not as rows. For example.

INFO => this data is in mastertable
   GOAL SUBGOAL => these datas are in details table     -  xxxxx     - xxxx => these datas are in detailstable which is in above detailstable.


Can i make a grid like this ? And can you give me an idea about this?
Thanks in advance.
0
Eyup
Telerik team
answered on 24 May 2013, 10:58 AM
Hello Saadettin,

You can implement a ListView type layout for your grid:
http://demos.telerik.com/aspnet-ajax/grid/examples/programming/listview/defaultcs.aspx

In case you need a more complex data visualization, please check our RadPivotGrid control:
http://demos.telerik.com/aspnet-ajax/pivotgrid/examples/firstlook/defaultcs.aspx

Hope this helps.

Regards,
Eyup
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Saadettin
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Saadettin
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or