Ticket Q517515
Visible to All Users

How to load data to the ASPxGridView inside the ASPxPopupControl on demand

created 12 years ago

Hi

I have 12 popup boxes on my page, each one with a gridview and an attached datasource (sqlDatasource and Object datasource).

The popup box is set to "

LoadContentViaCallback="OnFirstShow"

The gridview is bound to a datasource within the popup box

My problem is that the SQL data is all loaded on page load making my page very slow, is there a way to only load the datasouce when the popupbox is selected ?

Comments (3)

    The rest of thre page is data driven from a client table

    Artem (DevExpress Support) 12 years ago

      Hello Andrew,
      I'm afraid there is no built-in functionality to track which ASPxPopupControl is now selected, because, in fact, you're selecting controls inside it. Would you provide us with some screenshots or a screencast that illustrate the problem in action in order to find a precise solution to this problem.

        Hi
        A short video
        note the screen load time is massive (15secs on local PC , up to a minute across a network.
         showing the Client screen, first selecting a valid client with 4 disabiliities taken from Disabilities table
        Then Add a new Client, because there is no RefNo all disabilities for all clients are loaded.
        If you do an SQL Profiler, on Page load, all records from each and every table with a
        Gridview located in a popup box are loaded.
        Would it be possible to encapsulate the SQLDatasources in a loading panel at least showing 1 of XX datasources loaded?

        Answers approved by DevExpress Support

        created 12 years ago (modified 11 years ago)

        Hello,
        I believe that the best possible solution is to load ASPxGridView in ASPxPopupControl dynamically using callbacks.
        Please review the following threads to accomplish this task:
        How to dynamically load a control that supports callbacks into another control on callback
        How to load usercontrols via a callback in ASPxPopupControl
        You can also try binding ASPxGridView to LinqServerModeDataSource.This improves performance when binding the DevExpress ASP.NET Grid View (ASPxGridView) to a large data set. In this mode, only small portions of data are loaded into ASPxGridView on demand, and all required data processing (such as grouping and sorting) is performed on the data server side. You can review this approach in the 300,000 Records via LINQ demo.
        Let me know if you need further assistance.

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.