1. #1
    Sencha User
    Join Date
    Dec 2010
    Posts
    6
    Vote Rating
    0
    zetvio is on a distinguished road

      0  

    Question Image rendering in GridPanel

    Image rendering in GridPanel


    Hi,
    I'm creating a staff directory similar than this: http://stackoverflow.com/questions/6...id-using-extjs
    So I'm using a GridPanel where I render a different image in each row.

    When I load my my web page, 2 things happend:
    1. I load the store (with autoLoad:true)
    2. I set an arbitrary filter that return nothing so that we can't see everyone in the directory (GridPanel appears empty at startup)
    After this, I use filters to narrow selection in the gridPanel according to user input.

    The "problem" is that all the images are load at startup. I would rather prefer the images to be loaded only when they need to be displayed in the GridPanel.
    Is there any way to do that??

    Thanks!

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,169
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    images should load when the img tag deems necessary.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  3. #3
    Sencha User
    Join Date
    Dec 2010
    Posts
    6
    Vote Rating
    0
    zetvio is on a distinguished road

      0  

    Default


    Quote Originally Posted by jgarcia@tdg-i.com View Post
    images should load when the img tag deems necessary.
    Yes, but the image tag is created in my column's render function, so loading the store automatically renders the img tag because my gridPanel is bind to this store.
    Is it possible to load a store whitout displaying it in a gird panel?

  4. #4
    Sencha User
    Join Date
    Dec 2010
    Posts
    6
    Vote Rating
    0
    zetvio is on a distinguished road

      0  

    Default


    Ok, so I answered myself a while ago..
    For those who are interested in the answer, here is what I did:
    - I removed the 'renderer' function from my columnModel config
    - in my store load event I call the columnModel's setRenderer function like this
    Code:
    cm.setRenderer(cm.findColumnIndex("Photo"), renderIcon)
    It's as simple as that!!

Similar Threads

  1. Image rendering help
    By Pecc in forum Ext GWT: Discussion
    Replies: 3
    Last Post: 31 Aug 2010, 12:37 PM
  2. Image rendering in IE6, possible bug?
    By cyChop in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 7 Jul 2010, 7:33 AM
  3. Image in Gridpanel
    By simpleContent in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 10 Dec 2008, 6:00 AM
  4. event when a rendering of an image to div is done
    By mxu in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 6 May 2008, 6:55 AM

Tags for this Thread