Hierarchical GridView Rows Expanded

9 posts, 1 answers
  1. Ristogod
    Ristogod avatar
    63 posts
    Member since:
    Aug 2008

    Posted 15 Oct 2010 Link to this post

    I have this GridView that looks like this.

    <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?
  2. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 18 Oct 2010 Link to this post

    Hello Ristogod,

    You may take a look at this blog post for a reference.
     

    Kind regards,
    Maya
    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. Ristogod
    Ristogod avatar
    63 posts
    Member since:
    Aug 2008

    Posted 18 Oct 2010 Link to this post

    Thank you. I was able get it working with this information.
  5. Lynne
    Lynne avatar
    16 posts
    Member since:
    Feb 2011

    Posted 06 Sep 2011 Link to this post

    Is this link to the blog post example still valid?  I keep getting a server error and have tried several times over a couple of days.
  6. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 07 Sep 2011 Link to this post

    Hi Lynne,

    Please use this link instead. Do you still continue to get that error ?
     

    Greetings,
    Maya
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  7. Lynne
    Lynne avatar
    16 posts
    Member since:
    Feb 2011

    Posted 07 Sep 2011 Link to this post

    That link works!  Thank you very much. -LW
  8. Lynne
    Lynne avatar
    40 posts
    Member since:
    Sep 2011

    Posted 04 Nov 2011 Link to this post

    Would you please update the invalid blog post link in your response.  And, since this is the 3rd or 4th time I've asked the exact same question, would you please have something spider through your forums and fix up the blog URLs?

    Thanks very much,

    -
  9. Atanas
    Admin
    Atanas avatar
    22 posts

    Posted 08 Nov 2011 Link to this post

    Hello Lynne,

    We are currently refactoring our blogs due to the many broken links that suddenly appeared after a bug in the URL generator. Very soon we will apply major fix that should fix almost all broken links in our blogs and I hope that after this fix you want experience anymore such issues.

    All the best,
    Atanas
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  10. Lynne
    Lynne avatar
    40 posts
    Member since:
    Sep 2011

    Posted 08 Nov 2011 Link to this post

    Thank you very much!
Back to Top
UI for WPF is Visual Studio 2017 Ready