1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    39
    Vote Rating
    0
    rmulcha is on a distinguished road

      0  

    Default Unanswered: RowExpander Ajax Request

    Unanswered: RowExpander Ajax Request


    Hello there..,

    I am a beginner to GXT and we are trying out this for a new project, I need some help with below.

    I have a grid with RowExpander and I need to retrieve the additional data which need to be shown on row expansion by making an ajax call. I was trying that by setting that data in the onBeforeExpand event listener, but didnt work for me, can someone pls help me with this. Added my code below.

    Thank you for your help

    XTemplate tpl = XTemplate.create("<div><table class=\"simple-table\" width=\"50%\"><tr><th>Timestamp</th><th>Name</th><th>Description</th><th>Broker</th></tr><tpl for=\"events\"><tr><td>{timestamp}</td><td>{name}</td><td>{desc}</td><td>{broker}</td></tr></tpl></table></div>");

    final RowExpander expander = new RowExpander();
    expander.setTemplate(tpl);

    expander.addListener(Events.BeforeExpand, new Listener<RowExpanderEvent>() {

    @Override
    public void handleEvent(RowExpanderEvent be) {
    //This getDummyEvents is the one which will call the service and getData and updates the model object
    ((Transaction)be.getModel()).setEvents(getDummyEvents());
    }


    });


    List<ColumnConfig> configs = getColumnConfigs(expander);
    ColumnModel columnModel = new ColumnModel(configs);


    final Grid<BeanModel> grid = new Grid<BeanModel>(store, columnModel);
    grid.addPlugin(expander);



    }

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    39
    Vote Rating
    0
    rmulcha is on a distinguished road

      0  

    Default


    Any update on this please, can you provide some sample pls, with GXT3 would be ideal.

  3. #3
    Sencha User
    Join Date
    Jul 2009
    Location
    Trabzon
    Posts
    99
    Vote Rating
    0
    harun is on a distinguished road

      0  

    Default


    Hi,

    I can reccommend you to override method:

    Code:
    new RowExpander() {
    @Override
    protected boolean beforeExpand(ModelData model, Element body, El row, int rowIndex) {
                    // write your codes here...
                    return false;
                };
                
            };
    it is working for me.

    Best Regards,
    Website: harunates.com
    Blog: blog.harunates.com
    Feel free to contact me harun@harunates.com

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    39
    Vote Rating
    0
    rmulcha is on a distinguished road

      0  

    Default


    Thanks Harun.., That works !!

  5. #5
    Sencha User
    Join Date
    Jul 2009
    Location
    Trabzon
    Posts
    99
    Vote Rating
    0
    harun is on a distinguished road

      0  

    Default


    You're welcome,

    I used this widget but it is too slow for me,

    I made my own solution.

    Maybe it is give you an idea for your own solution
    Website: harunates.com
    Blog: blog.harunates.com
    Feel free to contact me harun@harunates.com

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi