简体   繁体   English

Gridview,有一个事件,我如何确定它已完成渲染?

[英]Gridview, is there an event, how would I determine that it has finished being rendered?

Gridview, is there an event, how would I determine that it has finished being rendered? Gridview,有一个事件,我如何确定它已完成渲染? 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. 抱歉,我应该更明确地说这实际上是网页而不是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. 最后,我设法通过向页面加载注册一个函数来解决该问题,在绘制控件后调用该函数,然后调用它们的gridview大小并调整其他控件的大小以适合。 It works and that is that. 它的工作原理就是这样。

Thanks. 谢谢。

GridView继承自Control因此您可以使用任何事件,我可以尝试PreRender ,它可以为您提供所需的东西

To see all the GridView events available to you; 查看所有可用的GridView事件;

In Design Mode, select the gridview and click F4. 在设计方式下,选择gridview并单击F4。 In the properties window there is a 'lighting' tab which lists all gridview events you can attach to. 在属性窗口中,有一个“照明”选项卡,其中列出了可以附加到的所有gridview事件。

假设您使用的是winforms,最好的方法是在DataBindingComplete事件中将数据绑定到网格之后。

设法解决它,请参阅上面的详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM