Gridview, is there an event, how would I determine that it has finished b开发者_高级运维eing rendered? That's basically it, I want to adjust the height of some other controls on the page and I want to pick up this event.
Sorry I should have been more explicit in stating that this is actually a web page not a winform. In the end I managed to solve the problem by registering a function with the page load which is called after the controls have been drawn and they calling the gridview size and resizing the other controls to fit. It works and that is that.
Thanks.
The GridView
inherits from Control
so you can use any of the events, I would try PreRender
, it seams it will provide you with what you need
To see all the GridView events available to you;
In Design Mode, select the gridview and click F4. In the properties window there is a 'lighting' tab which lists all gridview events you can attach to.
Assuming you are in winforms, the best place to do it would be after you bind data to your grid, in the DataBindingComplete event.
Managed to solve it, see details above.
精彩评论