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
490
InitializeLayout fires after InitializeRow
posted

I currently have some logic in the InitializeLayout event that has to execute each time new data is bound to my grid.  My grid's datasource is set to a BindingSource object.  When I first set the data source of my BindingSource, everything works fine.  However, I am then assigning a new object to the my BindingSource's datasource.  At this point neither the InitializeLayout or InitializeRow events fire.  In order to get the InitializeLayout event to fire I am calling the DataBind() method on my grid.  The problem is that after I do this the InitializeRow event is firing before the InitializeLayout event.  I have some processing in InitialzeRow that is dependent upon InitializeLayout firing first.  Is there any way to get InitializeLayout to fire first?

Thanks!

Steve

Parents Reply Children