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
65
When does InitializeLayout trigger?
posted

Hello,

I am trying to format the grid layout of a UltrWinGrid. I have the code to perform the formating of the layout and I have it triggering whenever the InitializeLayout event fires but I'm not getting the desired results in some cases. But that, I mean that sometimes when I set the DataSource property, the grid layout resets to the layout as defined in the dataset and it seems the InitializeLayout event does not trigger.

My question is, should I expect that the InitializeLayout event to trigger whenever the DataSource is set or is it more specific than that?

Thanks!

Joe

  • 469350
    Offline posted

    Hi Joe,

    InitializeLayout fires whenever the DataSource or DataMember of the grid is changed or the BindingManager triggers a Reset Notification.

    If the event is not firing, then my guess is that either the event has become unhooked, or else you are not actually changing the data source. Perhaps you are setting the grid's DataSource to the same object it was already set to?