Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
695
dynamically set number of rows displayed in a datagrid
posted

Hi I have a xamdatagrid embedded in a dock panel. The panel can be resized. The datagrid displays certain number of rows and what i want is to let the datagrid display the right number of rows that just fit the panel when it get resized.

I am almost done here, I am using dataGrid.ActualHeight to retrieve the acutal height of the panel, but I cannot find a property for the row height. Where can I find this property? I am currently using an approximated height of 25 but it won't fit the panel exactly. 

Any suggestion will be appreciated. Thanks.

  • 9836
    Suggested Answer
    posted

    You can try with the CellMinHeight property of the FieldSettings:

    <igDP:XamDataGrid.FieldSettings>
                    <igDP:FieldSettings  CellMinHeight="50"/>
    </igDP:XamDataGrid.FieldSettings>

    Hope this helps

    -Vlad