WPF FlexGrid Detail Row Height

Posted by: jgodbout on 11 March 2024, 6:47 am EST

    • Post Options:
    • Link

    Posted 11 March 2024, 6:47 am EST

    Is it possible to change the detail row height on the WPF FlexGrid. I have a data template for my detail row, but it doesn’t fit in the default space available in the detail row. However, I cannot find the parameter the lets me change the height of the row detail.

  • Posted 11 March 2024, 6:03 pm EST

    Hi,

    To customize the height of the DetailRow, you will need to set the height of the child panel used inside the DataTemplate for the RowDetailsTemplate. Please see the attached sample project for reference.

    <c1:C1FlexGrid.RowDetailsTemplate>
        <DataTemplate>
            <DockPanel Background="GhostWhite" Height="150">

    Attachment: RowDetailSizeDemo.zip

    Best Regards,

    Kartik

  • Posted 11 March 2024, 11:43 pm EST

    Hello,

    Thank you for the reply. However, when I run your sample solution and change the Heigh parameter to 300, it doesn’t change the detail row height displayed. The panel does get taller but it get hidden behind the next row in the grid. What I am looking for is when the user expands the row to show the details, it expands tall enough to show all the contents. In this solution with the DockPanel height set to 300, the image is moved down so that only half is displayed, the height of the displayed deatail row doesn’t change.

    Thanks

    Jamie

  • Posted 12 March 2024, 12:20 am EST

    Hi Jamie,

    We tested as per your observations and the sample project works fine on our end. Setting the DockPanel height to 300 increases the height of the whole DetailRow (ref. DockPanelHeight300.png). We also checked the “XAML Live Preview” window, which confirms the same (ref. DockPanelLiveXAML.png).

    Screenshots: Screenshots.zip

    Could you please confirm whether you are using the latest version of C1FlexGrid (4.6.20233.808) to run the sample project? If not, we suggest you once test with the latest version.

    If the issue persists, we request you update the sample project with your implementation and share it with us. It will help us investigate the behavior further and assist you in the best way possible.

    Best Regards,

    Kartik

  • Posted 12 March 2024, 3:36 am EST

    A couple of things. First of all in my application I am targeting .Net Core 8 and using the FlexGrid version 8.0.20233.702. In the application you sent me, it shows FlexGrid 4.6.20232.790, however, I upgraded to 4.6.20233.808 and tried it again. I’m still not seeing a change in the detail height. When I opened the file I have to update the target to .NET Framework 4.8. Seems that 4.8.1 isn’t supported on Windows Server 2019 OS. I am also using Visual Studio 2022.

    There does seem to be some differences between the .Net Framework version of the grid and the .Net core version. In particular, the core WPF syntax is different. It doesn’t have the RowDetailsTemplate property, but uses FlexGridDetailProvider instead.

    Thanks

    Jamie

  • Posted 12 March 2024, 5:21 am EST - Updated 12 March 2024, 5:27 am EST

    I’ve attached a small solution project that demonstrates the issue I am experiencing. I’ve also included screen shot of the application running which you can see the detail row height doesn’t change regardless of the dock height property.

    FlexGridDetailRow.zip

  • Posted 12 March 2024, 9:12 pm EST

    Hi Jamie,

    Thank you for sharing the version of C1FlexGrid you are using. JFYI, the .NET 8.0 version of C1FlexGrid uses FlexGridDetailProvider instead of the RowDetailsTemplate (.NET FW 4.6.2). To customize the height of the FlexGridDetailProvider, you can set its Height property.

    <i:Interaction.Behaviors>
        <!--Set the height of the FlexGridDetailProvider-->
        <c1:FlexGridDetailProvider Height="250">

    Please see the updated sample project for reference - FlexGridDetailRow_Updated.zip

    Best Regards,

    Kartik

  • Posted 12 March 2024, 11:09 pm EST

    Hi Kartik,

    Thank you. I updated the Height property and it is responding as expected.

    Jamie

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels