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
375
XamDataGrid hierarchical Display issue
posted

hi,

i have added xamdatagrid with hierarchical data. i have added the header at the top of grid for both Parent and child records. 

First time grid loading it will not display the columns properly once i changed the size of the column then it display perfect.

here i have attached the sample source code.

Please help me 

WpfApplication1.rar
  • 34510
    Verified Answer
    Offline posted

    Hello ripalsoni,

    Since you are setting the Width property on the Field and not the CellWidth property, CellWidthResolved is ignored at startup.  Once you resize a column though, CellWidthResolved is updated and your column alignment now looks correct.  Rather than using CellWidthResolved, you could probably just use LabelPresenter.ActualWidth inside your resizing event.  That way when the parent columns are resized, the child columns will use the same exact width.