1. #1
    Ext User
    Join Date
    Nov 2008
    Posts
    59
    Vote Rating
    0
    Bandorka is on a distinguished road

      0  

    Default Dataview does not fire click or dblclick event

    Dataview does not fire click or dblclick event


    Hi,

    I would really appreciate the help. I do not understand why the dataview does not want to fire any event attached. The items seem to show up in the dataview but no matter where I click, nothing happens.

    Thank you very much

    B

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    A DataView only fires click events when you click on an item.
    If you click outside the items DataView will fire a containerclick event.

  3. #3
    Ext User
    Join Date
    Nov 2008
    Posts
    59
    Vote Rating
    0
    Bandorka is on a distinguished road

      0  

    Default


    Thank you Condor for replying so fast. Of course I try to click on the item, but nothing happens. Any other idea?

    Thank you

    B

  4. #4
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Did you configure the itemSelector config option correctly?

  5. #5
    Ext User
    Join Date
    Nov 2008
    Posts
    59
    Vote Rating
    0
    Bandorka is on a distinguished road

      0  

    Default


    Quote Originally Posted by Condor View Post
    A DataView only fires click events when you click on an item.
    If you click outside the items DataView will fire a containerclick event.
    Well this is an interesting issue. I cant really make it work. The dataview is created runtime, for example after pressing a button a dataview is created DView1, DView2, DView 3 etc...
    I cant really config the itemSelector since the div the dataview is contained in is also dynamic and has no fix id.

    Press button -> create Div1 and Dview1
    Press buttonagain -> create Div2 and Dview2
    etc...

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    itemSelector is used with the DataView el as root, so it won't be affected by elements outside the current DataView that would match the itemSelector.

  7. #7
    Ext User
    Join Date
    Nov 2008
    Posts
    59
    Vote Rating
    0
    Bandorka is on a distinguished road

      0  

    Default


    The code:


    CSS:

    .Docuimages_thumb{
    background: #FFFFFF;
    padding:3px;
    }
    .Docuimages_thumb-img{
    border:1px solid white;
    height: 60px;
    width: 80px;
    }
    .Docuimages_thumb-wrap{
    float: left;
    margin: 4px;
    margin-right: 0;
    padding: 5px;
    }

    .Docuimages_thumb-wrap-span{
    display: block;
    overflow: hidden;
    text-align: center;
    font-size:7pt;

    }


    DView:

    var view = new Ext.DataView({
    id: DocuIDDocuView,
    itemSelector: 'Docuimages_thumb-wrap',
    style:'overflow:auto',
    multiSelect: false,
    layout: 'fit',
    //height: 50,
    //width: 100,
    //plugins: new Ext.DataView.DragSelector({dragSafe:true}),
    store: Newstore,
    tpl: new Ext.XTemplate(
    '<tpl for=".">',
    '<div class="Docuimages_thumb-wrap" id="imgdocu_{doc_id}">',
    '<div class="Docuimages_thumb"><img src="{icon_file}" class="Docuimages_thumb-img"></div>',
    '<span class="Docuimages_thumb-wrap-span">{doc_file_addname}</span></div>',
    '</tpl>'
    )
    });

    view.on('click', function(dview, index, node, e) {
    alert("W");
    });


    Could you suggest what am I doing wrong?

    Thank you,

    B

  8. #8
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    73
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    You're missing a dot in the itemSelector:
    Code:
    itemSelector: '.Docuimages_thumb-wrap',
    (remember it's a CSS or XPath selector)

  9. #9
    Ext User
    Join Date
    Nov 2008
    Posts
    59
    Vote Rating
    0
    Bandorka is on a distinguished road

      0  

    Default




    Thanks Condor... great. I am dumb..

Thread Participants: 1

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