1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    8
    Vote Rating
    0
    oneofakind007 is on a distinguished road

      0  

    Default Unanswered: Grid Panel Listener - Retrieving Data from an Object

    Unanswered: Grid Panel Listener - Retrieving Data from an Object


    Hey Community,

    Guys, I'm quite new to extJS and I would like your help.
    I have this Grid.Panel with listeners, I don't know if i got it right. Anyway, I got it to print out its properties but I cant get the data. Here is what the console printed out.

    Object { internalId=, raw={...}, data={...}, more...}

    after clicking it:

    Capture.PNG

    The "data" encircled in red. How do get those information?
    Attached Images

  2. #2
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Answers
    4
    Vote Rating
    4
    metalinspired is on a distinguished road

      1  

    Default


    Can you post some code?
    Image you attached shows a model instance whose data you can get with get() function.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,798
    Answers
    3467
    Vote Rating
    834
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Yeah, so to get the name property in the data object, you can do:

    Code:
    record.get('name')
    and it will return 'Barney Stinson' from what the image shows
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #4
    Sencha User
    Join Date
    Apr 2013
    Posts
    7
    Vote Rating
    0
    mohammadamir is on a distinguished road

      0  

    Default Tooltip

    Tooltip


    I nm not understand what happen is going on.

    dockedItems: [{
    xtype: 'toolbar',
    dock: 'top',
    items:[{
    text: '<img src="../static/images/refresh.gif" title="xyz">',
    enableToggle: true,
    iconCls: 'refresh', //nice refresh icon
    listeners: {
    toggle: function (button, pressed) {
    var grid = button.up('grid');
    if (!Ext.isDefined(grid.refreshTask)) { //check if the task is already created
    grid.refreshTask = runner.newTask({ //create task
    run: function () { getdata(); },
    interval: 30000
    });
    }
    if (pressed) { //toggle between start and stop
    grid.refreshTask.start();
    } else {
    grid.refreshTask.stop();
    }
    }
    }
    }]


    I want to add tooltip on image its done but iconCls: 'refresh', take some spece after image image show when I remove " iconCls: 'refresh', " its not show tooltip text.

  5. #5
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Answers
    4
    Vote Rating
    4
    metalinspired is on a distinguished road

      1  

    Default


    don't use text property to define icon.
    you should define icon as background-image in CSS class that you add in iconCls.
    to add tooltip simply add tooltip property to the button you're creating and call Ext.tip.QuickTipManager.init(); when initializing your application to enable tooltips

  6. #6
    Sencha User
    Join Date
    Apr 2013
    Posts
    7
    Vote Rating
    0
    mohammadamir is on a distinguished road

      0  

    Default Tooltip

    Tooltip


    Thanks metalinsepride
    I was missing to add Ext.tip.QuickTipManager.init();

  7. #7
    Sencha User
    Join Date
    Apr 2013
    Posts
    7
    Vote Rating
    0
    mohammadamir is on a distinguished road

      0  

    Default Tooltip dynamic

    Tooltip dynamic


    Now I want to use tooltip dynamic when button is pressed tooltip = start when button unpressed tooltip = stop.
    What I will have to add ?

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