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
2589
Missed cell control in header cells
posted

Hello,

I have 31 columns grid and I have to initialize some control in customized header cells. And I have 2 questions:

1. Which event I should use to have header cell != null by the moment of initialization?

2. I have this code: 

HeaderCellControl hcc = (HeaderCellControl)((RowsManager)row.Manager).HeaderRow.Cells[FieldName].Control; 

When InitializeRow event fires, e.Row.Cells contains all 31 cells but, for cells which index >= 8, HeaderCellControl is always null! Why?

Thank you

Parents
No Data
Reply
  • 40030
    Offline posted

    Hi, 

    The grid uses Virtualization and recycling, so only cells that are currently visible actually have controls attached to them, and the controls that were previously used are then reused for the new visible cells, this keeps our memory footprint low, and the silverlight application fast.

    What kind of initialization are you trying to do, perhaps i can help you find another way to initialize. 

    -SteveZ

Children