I have this GridView that looks like this.
I've been trying to get this to have the rows be expanded after binding if there are Loads within Steps. However I can't figure out how to make them Expended by Default, and how to hide the IsExpandable click opener when there are no Loads within Steps. In the help file, it shows how to enable and disable IsExpandable on RowLoaded event. However, when binding occurs, nothing is updated as the RowLoaded doesn't fire. Can anyone comment on how to make the rows expanded by default, and which events to use to make the IsExpandable work as binding occurs?
<
tg:RadGridView
tc:RadDockPanel.Dock
=
"Top"
ItemsSource
=
"{Binding Steps}"
SelectedItem
=
"{Binding CurrentSelectedStep, Source={x:Static SizingApp:ProjectManager.Instance}, Converter={StaticResource PSSpecConverter}, Mode=TwoWay}"
Style
=
"{StaticResource RadGridViewStyle}"
RowLoaded
=
"RadGridView_RowLoaded"
>
<
tg:RadGridView.ChildTableDefinitions
>
<
tg:GridViewTableDefinition
>
<
tg:GridViewTableDefinition
/>
</
tg:GridViewTableDefinition
>
</
tg:RadGridView.ChildTableDefinitions
>
<
tg:RadGridView.HierarchyChildTemplate
>
<
DataTemplate
>
<
tg:RadGridView
ItemsSource
=
"{Binding Loads}"
SelectedItem
=
"{Binding CurrentSelectedLoad, Source={x:Static SizingApp:ProjectManager.Instance}, Converter={StaticResource PSSpecConverter}, Mode=TwoWay}"
Style
=
"{StaticResource RadGridViewStyle}"
>
<
tg:RadGridView.Columns
>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_LoadColumn_Header}"
TextAlignment
=
"Left"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding Abbreviation}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_TypeColumn_Header}"
TextAlignment
=
"Left"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding Quantity}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_QuantityColumn_Header}"
TextAlignment
=
"Center"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding RunningKVA, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_RunningKVAColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding RunningKW, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_RunningKWColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding StartingKVA, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_StartingKVAColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding StartingKW, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_StartingKWColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewCheckBoxColumn
DataMemberBinding
=
"{Binding IsNonLinear}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_NonLinearColumn_Header}"
/>
</
tg:RadGridView.Columns
>
</
tg:RadGridView
>
</
DataTemplate
>
</
tg:RadGridView.HierarchyChildTemplate
>
<
tg:RadGridView.Columns
>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_StepColumn_Header}"
TextAlignment
=
"Left"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding VoltageDip, StringFormat={Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=VoltageDipFormat}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_VoltageDip_Header}"
TextAlignment
=
"Center"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding RunningKVA, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKVAColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding RunningKW, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKWColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding StartingKVA, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_StartingKVAColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding StartingKW, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_StartingKWColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding RunningKVASum, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKVASumColumn_Header}"
TextAlignment
=
"Right"
/>
<
tg:GridViewDataColumn
DataMemberBinding
=
"{Binding RunningKWSum, StringFormat={}{0:F2}}"
Header
=
"{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKWSumColumn_Header}"
TextAlignment
=
"Right"
/>
</
tg:RadGridView.Columns
>
</
tg:RadGridView
>
I've been trying to get this to have the rows be expanded after binding if there are Loads within Steps. However I can't figure out how to make them Expended by Default, and how to hide the IsExpandable click opener when there are no Loads within Steps. In the help file, it shows how to enable and disable IsExpandable on RowLoaded event. However, when binding occurs, nothing is updated as the RowLoaded doesn't fire. Can anyone comment on how to make the rows expanded by default, and which events to use to make the IsExpandable work as binding occurs?