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
785
What event is fired once the grid is done rendering and has settled down?
posted

For the life of me I can not figure out what event is fired that says "I've bound myself to the data, I've sized my columns, I've displayed, and I'm ready for you to change me.  Hey, even my 'Resolved' properties have been resolved"?

What I'm really trying to do is have the grid render itself completely and then reset a few properties.  The properties are not yet ready to be reset during the form's Load event (even when calling the base.OnLoad).  

A snippet:

  • Tell grid to AutoFitStyle.ResizeAllColumns.
  • bind grid.
  • set fixed column sizes.

... Let Grid render and compute proper column sizes for non-fixed columns.

Receive special unknown event telling me all rendering is done
  • Grab the column.CellSizeResolved.Width of the non-fixed columns.
  • Tell grid to AutoFitStyle.None.
  • Reset the column.Width to the 'grabbed' resolved widths above.
This will make the grid size all non-fixed columns to their WeightX'ed sizes filling up all horizontal space available and then allow me to reset the grid to not allow auto adjusting of column sizes when the form is moved or the user resizes a non-fixed width column.