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
558
Lock the top row of a grid in a scroll viewer
posted

Hi,

I want to keep the header on a grid on top of the screen no matter where the grid is focused in the scroll viewer.  Is this possible? Similar to Excel where you can freeze the top row.

Thanks,

Kyle

Parents
  • 9694
    Verified Answer
    posted

    It sounds like you have added the XamDataGrid to a ScrollViewer and you want the header secton of the XamDataGrid to remain fixed at the top of the scroller. The XamDataGrid contains its own ScrollViewer for scrolling thrpough Records. If you remove the XamDataGrid from the ScrollViewer then set the Height to either a fixed number or set to Auto and make sure its container has a Fixed height, then the scrolling will automatically work and then you will find the Headers fixed at the top.

    However, if you wish to "freeze" or fix the top row or record in the grid, then you must enable RecordFixing. This can be accomplished with a few lines of XAML:

    <igDP:XamDataGrid.FieldLayoutSettings>
        <igDP:FieldLayoutSettings 
    AllowRecordFixing
    ="Top" 
    FixedRecordUIType
    ="Default"/>
    </igDP:XamDataGrid.FieldLayoutSettings>

    Please let me know if you need further assistance with this.

    Thanks,

Reply Children
No Data