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

Hierarchy Grid issue ?

0 Answers 58 Views
GridView
This is a migrated thread and some comments may be shown as answers.
kumar p
Top achievements
Rank 1
kumar p asked on 27 May 2010, 03:29 PM
hi,
 i have  an issue  where  i need  to   have  4  grid view  placed( where i will be  performing  drill  down  operation).
 this  image  makes  you  clear  what i am trying to achive?

Case1 : tried and  working  but design issue( the  vertical bars  are not getting arranged  properly).and  not able  to add  my own defined  styles  to gridview
 right now i  went ahead  with  placing nested  gridview  concepts there  everything works  fine  except there is an design issue.
 right now i  have  designed  like this.

 <telerik:RadGridView x:Name="RadGrid1" >
   <telerik:RadGridView.Columns>
   </telerik:RadGridView.Columns>
 <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
                        <telerik:RadGridView x:Name="RadGrid2">
                         <telerik:RadGridView.Columns>
                       </telerik:RadGridView.Columns>
 <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>
<telerik:RadGridView x:Name="RadGrid3">
                       <sdk:DataGrid.Columns>
                      </sdk:DataGrid.Columns>                  
 <telerik:RadGridView.RowDetailsTemplate>
</telerik:RadGridView>
  </DataTemplate>
                        </telerik:RadGridView.RowDetailsTemplate>
                    </telerik:RadGridView>

 case 2: which i will be  trying  now before that i wanted  to know whether  this  will work or no?  before that i wanted  your  views on that 

1: can i use  this  concept  telerik:RadGridView.ChildTableDefinitions wil this  work  ?
  where i need  to  place  four gridview  and in  every first column of the grid  i will be  having an   image button once  i click this   button    i will be  showing the  the   griview1--> griview2--> griview3-->griview4
  it   much like an expand and collpase opeartion  done .

 the  below  code is the an example  showing  Hierarchy grid.  . here  in my casei have  gridview(2,3,4) i will not be  specfying any data source  in xaml page

 i will be  assiging the datasource only when  i  do expand  operation on the button  . during page load i will load the first girdview1
 for all other  grids   i wil be loading data once   at button click where i do expand and collpase.

 on button click1 of   gridview1   i will get data   for second gridview2.
 on button click2 of   gridview2   i will get data   for second gridview3.
 on button click3 of   gridview3   i will get data   for second gridview3.

 hope my Question is  clear. any help  would be grealty appreciated.

 on button click1 of   gridview1   i will get data   for second gridview2.



 the below is an example where  i   got  from telerik control.
<Grid>
        <telerik:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="False" GridLinesVisibility="Horizontal" ItemsSource="{Binding Orders}"  IsReadOnly="True" AutoGenerateColumns="False">
            <telerik:RadGridView.ChildTableDefinitions>
                <telerik:GridViewTableDefinition />
            </telerik:RadGridView.ChildTableDefinitions>
                <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding OrderDate}" Header="Order Date" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Employee.LastName}" Header="Employee" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Freight}" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ShipCountry}" Header="Ship Country" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ShipCity}" Header="Ship City" />
            </telerik:RadGridView.Columns>
            <telerik:RadGridView.HierarchyChildTemplate>
                <DataTemplate>
                    <telerik:RadGridView x:Name="RadGridView1" CanUserFreezeColumns="False" AutoGenerateColumns="False" ItemsSource="{Binding Order_Details}"  ShowGroupPanel="False" IsReadOnly="True">
                        <telerik:RadGridView.Columns>
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding ProductID}" Header="Product ID" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding UnitPrice}" DataFormatString="{}{0:c}" Header="Unit Price" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Quantity}" Header="Quantity" />
                            <telerik:GridViewDataColumn DataMemberBinding="{Binding Discount}" Header="Discount" />
                        </telerik:RadGridView.Columns>
                    </telerik:RadGridView>
                </DataTemplate>
            </telerik:RadGridView.HierarchyChildTemplate>
        </telerik:RadGridView>
    </Grid>


griview1

No answers yet. Maybe you can help?

Tags
GridView
Asked by
kumar p
Top achievements
Rank 1
Share this question
or