Problem loading large amount of data (WCF RIA)

6 posts, 0 answers
  1. license
    license avatar
    3 posts
    Member since:
    May 2007

    Posted 28 Apr 2011 Link to this post

    Hi,

    I have a simple application that displays info from SQL Server in a telerik:RadGridView using a telerik:RadDomainDataSource.
    The application has been working just fine for a couple of weeks but today the number of rows reached a number that made the application crash with a nonsense error message like 'An error occured while loading data through the 'GetTransactions' query on DomainContext of type 'TransactionsDS' and the error was not handled'. I know the data is clean and I know the exact breaking point (4367 rows) so all I need is to increase some property to let it fetch the extra rows but I just don´t know where this property is.

    Debugging it seemed that the 'GetTransactions' did in fact get the data just fine and that the problem is client side but in the Silverlight project there isn´t even a config-file so I'm really in the blue as of where to tweak the size-, length-, number of something-property for this.

    Any ideas?
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 28 Apr 2011 Link to this post

    Hello plg,

     This may happen if you are trying to return large collection at once. You need to use paging. 

    Kind regards,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. license
    license avatar
    3 posts
    Member since:
    May 2007

    Posted 28 Apr 2011 Link to this post

    Hi Vlad,

    Thanks for the quick reply!

    I agree that at some point I'll have to start paging the data, but the users actually need to display this many rows, and obviously a couple more, in order to group one month worth of data conveniently and make summaries to check that the data is in order. The grid has only got 14 columns so it's not an enormous amount of data.

    Is there really no way to increase the allowed amount of data being passed to the grid?
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 28 Apr 2011 Link to this post

    Hello plg,

     Generally this is not related to our grid in any way - you will get the same problem if you try to return the same collection and bind it to a plain ListBox.

    Regards,
    Vlad
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. license
    license avatar
    3 posts
    Member since:
    May 2007

    Posted 28 Apr 2011 Link to this post

    Hi Vlad,

    Yes, I realize that it's not a grid issue and that's why I figured I'd post it under the DomainDataSource-category.

    With the users desires remaining my question also remains though, is there ANY way of tweaking the values or do I need to go about and solve this problem some other way?
  7. Naunihal
    Naunihal avatar
    12 posts
    Member since:
    Jun 2008

    Posted 21 Nov 2011 Link to this post

    There is a loadsize Property on DomainDatasource, set it to the value where it does not give error, It will pull all the records by executing multiple Service Call each getting the data of LoadSize till all the Data has been retrieved.
    Say you make it to 1000 rows and if you have 10,000 rows, it will make 10 call to pull down all 10,000 rows, but 1,000 in each call.

    This will allow you to pull down infinite number of rows(Depending on Machine Capacity), in progressive batch(multiple service calls) till all the data is returned. there is another Property on DDS which allows you to configure delay between multiple service Calls.

    Remember your client side LoadCompleted event will fire multiple time as well, so you need to comeup with stratgey to figure, when actually all the Data was loaded(check is the count is Less then Loadsize and it is not the first instance of execution, you might have to tweak, how to find if that was the last call)

    The limit has been set rightly as silverlight operates over Web(Web is not meant for Large Data Retrival or Complex UI) hence the limits are in place by default.

    There are other options which can be configured in webConfig(Can't remember property, may be MaxBuffersize), but if you are pulling very large data, you will hit that limit as well.
Back to Top
DevCraft banner