1. #21
    Sencha User trbs's Avatar
    Join Date
    Mar 2007
    Posts
    310
    Vote Rating
    0
    trbs is on a distinguished road

      0  

    Default


    cool

    i knew there was a reason why i did params.start !== undefined and not just if(params.start) in my earlier version... that was it

  2. #22
    Touch Premium Member
    Join Date
    Mar 2007
    Location
    Canada
    Posts
    17
    Vote Rating
    0
    jt is on a distinguished road

      0  

    Default


    Using this as a base, would it be possible to take this further?

    The problem I am now facing is that the data displayed in the grid is just summary data.
    I need to be able to filter via the detailed data which is in the database. And to top it off I am also using DWR.

    So is it possible to combine filtering for the in memory grid data while doing a server call to filter via detailed data from the database. Or is it better to do all the filtering on the server and just return the results to the browser?

    Here's an example:
    I want to display summary information about a user (first name, last name, address), but I also want to be able to filter the data via fields that are not displayed in the grid (birth date, age, personal notes, etc).

    I might be complicating things more than they need to be, so any help would be appreciated.

  3. #23
    Sencha User trbs's Avatar
    Join Date
    Mar 2007
    Posts
    310
    Vote Rating
    0
    trbs is on a distinguished road

      0  

    Default


    Quote Originally Posted by jt View Post
    Using this as a base, would it be possible to take this further?

    The problem I am now facing is that the data displayed in the grid is just summary data.
    I need to be able to filter via the detailed data which is in the database. And to top it off I am also using DWR.
    Sorry i have no experience with DWR and what implications that has on your question. (i hope none )
    So is it possible to combine filtering for the in memory grid data while doing a server call to filter via detailed data from the database. Or is it better to do all the filtering on the server and just return the results to the browser?
    Personally i think it's better to just do the filtering on the server, it's most likely easier then messing around with it on the client. (specially if you want to split the user list and user details)
    Here's an example:
    I want to display summary information about a user (first name, last name, address), but I also want to be able to filter the data via fields that are not displayed in the grid (birth date, age, personal notes, etc).

    I might be complicating things more than they need to be, so any help would be appreciated.
    Sure i think that can be done. You'll most likely could end up with overwriting most of the Store's components. (Proxy and Reader) To make them behave like you want to.

    As long as it isn't a problem for u to keep all data in memory then you can search the non-showed data as easily as the data shown in the grid. (your searching the underlying data store, not the grid itself) Otherwise u will just query the server again for user details and then the possible speed gain of client side filtering is gone anyways.

    But if u can, start with serverside filtering, that's what is most commonly used in Ext and the easiest to build. (and you can always which over in the feature)

  4. #24
    Sencha User
    Join Date
    Jun 2007
    Posts
    31
    Vote Rating
    0
    pianoroy is on a distinguished road

      0  

    Default


    Quote Originally Posted by waterlowa View Post
    I tried the PagingMemoryProxy. It's cool. But I'm going back to HttpProxy()...

    Reason is I find the ds hard to manipulate, especially when adding new row or deleting rows.

    In particular, ds.reload() doesn't do anything. Maybe I missed something.
    Is there any way to load a new dataset into a BufferedMemoryProxy after it has been created?

    I have an iTunes-like interface that loads data into the grid whenever the user makes a selection above. I'm trying to use BufferedMemoryProxy (see earlier in the thread), but I can't figure out how to load a new double-nested array into it. If I'm using no paging, the following works great:
    Code:
    data_store.loadData(data);
    data_store.fireEvent('datachanged');
    Is there an equivalent that pipes the data through a BufferedMemoryProxy?

  5. #25
    Sencha User
    Join Date
    Jun 2007
    Posts
    31
    Vote Rating
    0
    pianoroy is on a distinguished road

      0  

    Default


    Is there an equivalent that pipes the data through a BufferedMemoryProxy?
    Yes, there is. I just found it.

    Code:
    delete data_store.proxy.data;
    data_store.proxy.data = data;
    data_store.load({params:{start:0, limit:page_size}})
    data_store.fireEvent('datachanged');
    Hope that helps someone.

  6. #26
    Sencha User
    Join Date
    Jun 2007
    Posts
    31
    Vote Rating
    0
    pianoroy is on a distinguished road

      0  

    Default


    Jack, is this the "advisable" way to do it, or is there a better way?

  7. #27
    Ext User heidtmare's Avatar
    Join Date
    Mar 2007
    Location
    The Space Coast, FL
    Posts
    307
    Vote Rating
    0
    heidtmare is on a distinguished road

      0  

    Default


    This PagingMemoryProxy has been awesome for me.

    I've noticed that since I'm loading from memory the refresh button is completely worthless.
    How do i turn it off?
    I like it. Simple, easy to remember.
    ...but why is the rum gone?

  8. #28
    Ext User heidtmare's Avatar
    Join Date
    Mar 2007
    Location
    The Space Coast, FL
    Posts
    307
    Vote Rating
    0
    heidtmare is on a distinguished road

      0  

    Default


    In addition: if i turn on column sorting, it only sorts what is in the current page.
    How would i make it sort the entire store and refresh to the current page?
    I like it. Simple, easy to remember.
    ...but why is the rum gone?

  9. #29
    Ext JS Premium Member dogomatic's Avatar
    Join Date
    Aug 2007
    Location
    Canada
    Posts
    111
    Vote Rating
    1
    dogomatic is on a distinguished road

      0  

    Default


    Add remoteSort: true to your data.Store config.

  10. #30
    Sencha - Community Support Team hendricd's Avatar
    Join Date
    Aug 2007
    Location
    Long Island, NY USA
    Posts
    5,962
    Vote Rating
    10
    hendricd will become famous soon enough hendricd will become famous soon enough

      0  

    Thumbs up Trouble with sorting...

    Trouble with sorting...


    You'll need to replace this function:

    Code:
    var fn = function(r1, r2){
        return r1 < r2;
    };
    with:
    Code:
    var fn = function(r1, r2){
        return r1 == r2?0:r1 < r2?-1:1;
    };
    to get the sorting to work properly.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.


    Got Sencha licensing questions? Find out more here.


Similar Threads

  1. [SOLVED] Memory Leak in Paging Grid Example?
    By cobnet in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 3 May 2007, 8:24 PM
  2. Grid DataModel keeps data in memory
    By tane in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 24 Feb 2007, 12:38 PM
  3. How to call array-grid?
    By sailaja in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 16 Jan 2007, 6:56 AM
  4. Array-Grid in YUI
    By sailaja in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 10 Jan 2007, 3:18 AM
  5. Array Grid Example
    By qintnt in forum Ext 1.x: Help & Discussion
    Replies: 1
    Last Post: 4 Dec 2006, 5:06 AM

Thread Participants: 19

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar