本文介绍了Devex preSS电网延迟加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.Net网页上的DevEx preSS数据网格。因为在电网负荷来表明需要的数据慢,我想网格加载后,页面完全加载。

请问DevEx preSS电网支持呢?


解决方案

有可能实现推迟ASPxGridView数据按以下方式结合:

1)处理是在客户端中提出的控制已初始化但在浏览器中被显示之前后客户端ASPxClientGridView.Init事件;

2)经由所述客户端ASPxClientGridView.PerformCallback方法(传递的任何数据作为参数)执行ASPxGridView的定制回调

3)处理服务器端ASPxGridView.CustomCallback事件,并绑定网格(基于传递的参数):

 < D​​X:ASPxGridView ... OnCustomCallback =grid_CustomCallback>
    < ClientSideEvents初始化=功能(S,E){
        s.PerformCallback('');
    }/>
< / DX:ASPxGridView>保护无效grid_CustomCallback(对象发件人,ASPxGridViewCustomCallbackEventArgs E){
    /*e.Parameters*/
    (发件人为ASPxGridView).DataBind()
}

I have a DevExpress data grid on an ASP.Net webpage. Because the data that needs to be shown in the grid loads slow I would like the grid to load after the page is fully loaded.

Does DevExpress grid support this?

解决方案

It is possible to implement a "postponed" ASPxGridView data binding in the following manner:

1) handle the client-side ASPxClientGridView.Init event that is raised on the client side after the control has been initialized but prior to it being displayed within the browser;

2) perform the ASPxGridView’s custom callback via the client-side ASPxClientGridView.PerformCallback method (pass any data as the parameter);

3) handle the server-side ASPxGridView.CustomCallback event and bind the grid (based on the passed parameter):

<dx:ASPxGridView … OnCustomCallback="grid_CustomCallback">
    <ClientSideEvents Init="function(s, e) {
        s.PerformCallback('');
    }" />
</dx:ASPxGridView>

protected void grid_CustomCallback(object sender, ASPxGridViewCustomCallbackEventArgs e) {
    /*e.Parameters*/
    (sender as ASPxGridView).DataBind()
}

这篇关于Devex preSS电网延迟加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 00:19