[FIXED] [V0.8.0] When a Store initially receives empty data...

  1. #1

    [FIXED] [V0.8.0] When a Store initially receives empty data...

    When the first datasource of a Store is empty it no longer works even if it is rebound with a collection. The error received is "this.getTotal is not a function".

    The problem is exactly as described in the following thread:

    http://forums.ext.net/showthread.php?832

    There it says it was fixed, but i downloaded a couple of days ago the Coolite assembly and the issue remains.

    Any ideas?
    Last edited by geoffrey.mcgill; Feb 21, 2011 at 9:43 PM.
  2. #2

    RE: [FIXED] [V0.8.0] When a Store initially receives empty data...

    *Hi,

    Can you post the code which reproduce this error? We tested code from original post and it appears to work correctly.


  3. #3

    RE: [FIXED] [V0.8.0] When a Store initially receives empty data...

    Looks like it doesn't work when the datasource is a Linq IQueryable collection.

    For example:

    Store2.DataSource = db.AddressBookContacts.Skip(e.Start).Take(e.Limit);
    This returns a generic <AddressBookContact> collection and if it is empty, the bug arises. Even if i call any of the following, it still fails:

     db.AddressBookContacts.Skip(e.Start).Take(e.Limit).ToList();
    
    OR
    
    db.AddressBookContacts.Skip(e.Start).Take(e.Limit).ToArray();
    BUT curiously, if i create a generic List<AddressBookContact> collection and set is as a datasource, even if it's empty, it works.

    Right now i'm using that as a workaround, if the db.AddressBookContacts query doesnt return any items, i just set the datasource as a new empty List<AddressBookContact> collection.

    Store2.DataSource = new List<AddressBookContact>();
    Weird thing, at least i found a workaround.
    Last edited by geoffrey.mcgill; Feb 21, 2011 at 9:45 PM.
  4. #4

    RE: [FIXED] [V0.8.0] When a Store initially receives empty data...

    Hi,

    Thanks, I was able to reproduce the error. The bug was fixed and committed.
    *

Similar Threads

  1. Replies: 5
    Last Post: May 17, 2011, 9:10 AM
  2. Replies: 0
    Last Post: Jun 26, 2009, 11:32 AM
  3. Store Listener - Only if Store not empty?
    By Tbaseflug in forum 1.x Help
    Replies: 4
    Last Post: Feb 24, 2009, 12:50 PM
  4. Replies: 7
    Last Post: Feb 13, 2009, 3:27 PM
  5. Replies: 4
    Last Post: Nov 17, 2008, 8:16 AM

Posting Permissions