开发者

Devexpress grid lazy loading

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 t开发者_开发技巧o 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()
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜