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
420
Bring column into view
posted

I have a grid with 200+ columns. A user may type a column name (in a separate textbox) they want to scroll into view. Is there a way to programmatically bring a specific column into view? Thanks!

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    There is really no method exposed for bringing a column into view, but you can either use the BringCellIntoView method and bring some cell from that field into view or scroll the XamDataGrid horizontally using the SetHorizontalOffset method. However, you will need to calculate how much you need to scroll. For example in a simple scenario :

                xamDataGrid1.ScrollInfo.SetHorizontalOffset(xamDataGrid1.DefaultFieldLayout.Fields[0].LabelWidthResolved*2 + xamDataGrid1.DefaultFieldLayout.RecordSelectorExtentResolved);

Children
No Data