This question is locked. New answers and comments are not allowed.
Hi,
In my Application I need to use two grids in Hierarchical manner.I am not getting the way to insert data into child grid from list.I am attching image of ma application.and here is my code:
In my Application I need to use two grids in Hierarchical manner.I am not getting the way to insert data into child grid from list.I am attching image of ma application.and here is my code:
<
UserControl
x:Class
=
"SilverlightApplication2.MainPage"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:telerikGrid
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
xmlns:telerikQuickStart
=
"clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=Telerik.Windows.Controls"
xmlns:local
=
"clr-namespace:SilverlightApplication2"
mc:Ignorable
=
"d"
d:DesignHeight
=
"589"
d:DesignWidth
=
"831"
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
Width
=
"880"
Height
=
"586"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"8"
/>
<
RowDefinition
Height
=
"576"
/>
<
RowDefinition
Height
=
"2*"
/>
</
Grid.RowDefinitions
>
<
Border
telerikQuickStart:ThemeAwareBackgroundBehavior.IsEnabled
=
"True"
Grid.RowSpan
=
"2"
Margin
=
"-7,-3,0,22"
HorizontalAlignment
=
"Left"
Width
=
"880"
>
<
telerikGrid:RadGridView
ShowColumnFooters
=
"True"
AutoGenerateColumns
=
"False"
ItemsSource
=
"{Binding lstVessel}"
CanUserInsertRows
=
"True"
Name
=
"radGridView1"
Height
=
"420"
Width
=
"880"
IsReadOnly
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding VesselType1;}"
Width
=
"400"
Header
=
"Vessel Type"
>
<
telerik:GridViewColumn.Footer
>
<
telerik:RadButton
x:Name
=
"Add"
Content
=
"AddNewRow"
Command
=
"telerikGrid:RadGridViewCommands.BeginInsert"
CommandTarget
=
"{Binding ElementName=radGridView1}"
/>
</
telerik:GridViewColumn.Footer
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding IsActive1}"
Header
=
"Is Active"
Width
=
"400"
/>
</
telerik:RadGridView.Columns
>
<
telerik:RadGridView.ChildTableDefinitions
>
<
telerik:GridViewTableDefinition
/>
</
telerik:RadGridView.ChildTableDefinitions
>
<
telerik:RadGridView.HierarchyChildTemplate
>
<
DataTemplate
>
<
telerik:RadGridView
x:Name
=
"radGridView2"
AutoGenerateColumns
=
"False"
ShowColumnFooters
=
"True"
ItemsSource
=
"{Binding lstOperationProfile}"
Height
=
"217"
Width
=
"880"
IsReadOnly
=
"False"
Loaded
=
"radGridView2_Loaded"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
IsReadOnly
=
"False"
Width
=
"170"
Header
=
"OperationID"
DataMemberBinding
=
"{Binding Operation}"
>
<
telerik:GridViewColumn.Footer
>
<
telerik:RadButton
x:Name
=
"Add"
Content
=
"AddNewRow"
Command
=
"telerikGrid:RadGridViewCommands.BeginInsert"
CommandTarget
=
"{Binding ElementName=radGridView1}"
/>
</
telerik:GridViewColumn.Footer
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
IsReadOnly
=
"False"
Width
=
"170"
Header
=
"OperationName"
DataMemberBinding
=
"{Binding TimeHrs}"
/>
<
telerik:GridViewDataColumn
IsReadOnly
=
"False"
Width
=
"170"
Header
=
"OperationTime"
DataMemberBinding
=
"{Binding TimePercen}"
/>
<
telerik:GridViewDataColumn
IsReadOnly
=
"False"
Width
=
"170"
Header
=
"LoadOnGensets"
DataMemberBinding
=
"{Binding LoadOnGensets}"
/>
<
telerik:GridViewDataColumn
IsReadOnly
=
"False"
Width
=
"170"
Header
=
"Total"
DataMemberBinding
=
"{Binding Total}"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
DataTemplate
>
</
telerik:RadGridView.HierarchyChildTemplate
>
</
telerikGrid:RadGridView
>
</
Border
>
<
telerik:RadButton
Content
=
"Button"
Grid.Row
=
"1"
Height
=
"35"
HorizontalAlignment
=
"Left"
Margin
=
"333,15,0,0"
Name
=
"radButton1"
VerticalAlignment
=
"Top"
Width
=
"136"
Click
=
"radButton1_Click"
/>
</
Grid
>
</
UserControl
>