Results 1 to 10 of 10

Thread: Issue with YAHOO.ext.grid.Grid addlistener

  1. #1

    Default Issue with YAHOO.ext.grid.Grid addlistener

    Hi,
    I have code that builds Yahoo grid and displays data in rows. When I double click any row, it calls another function that brings a pop-up to display detailed results for selected row. I am attaching a listener to each row for doubleclick event.

    It works fine with IE but not with FirFox. Here is the code:

    function postGrid(req) {
    if (req.readyState == 4) {
    if (req.status == 200) {
    _colData = req.responseText;
    var sort = YAHOO.ext.grid.DefaultColumnModel.sortTypes;
    var colData1 = new YAHOO.ext.grid.DefaultColumnModel(eval(_colData));
    var rowData = ibos;
    var dataModel = new YAHOO.ext.grid.DefaultDataModel(rowData);
    var grid = new YAHOO.ext.grid.Grid('dynamicTable', {
    dataModel: dataModel,
    colModel: colData1,
    trackMouseOver: true
    }
    );
    grid.autoSizeHeaders = true;
    grid.render();
    grid.getSelectionModel();
    grid.addListener('rowdblclick', onRowClick);
    }
    }
    }

    function onRowClick(grid, rowIndex, e){
    if(grid.getRow(rowIndex) != null) {
    currentRowIndex = grid.getSelectedRowIndex();
    //var _a = grid.getFirstCell(grid.getRow(rowIndex), false);
    var _a = grid.getFirstCell(grid.getRow(currentRowIndex), false);
    var _b = _a.firstChild;
    var _c = _b.firstChild;
    downliner = _c.title;
    alert(downliner);
    popupDownliner(downliner);
    }
    }

    There is tree on left. If I click the tree node, it builds the grid and displays the data rows.
    The error with FireFox is that, when I click the tree node: It displays the alert(downliner);
    twice while I add only 1 listener with the each grid row. Why it displays twice?
    I have investigated further and to my understanding, it somehow registers number of clicks on the node and when I click grid it also displays the node elelment. It should not show node element because I need only grid elelment to display result.

    How to fix?

    Somebody please help.

    Thanks in advance.

  2. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    You have the wrong forum. This is Ext, not YUI.

  3. #3

    Default

    Hi,

    Do you know link to YUI forum?

    Thanks.

  4. #4
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

  5. #5

    Default

    Thanks a lot for help.

  6. #6

    Default

    YAHOO.ext.grid.Grid is ext to my understanding and not yui. I am using both. YUI for building tree and ext for grid. The issue is with ext part and not yui.

    What you think?

    Thanks.

  7. #7
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    YAHOO.ext is an extremely old version, it was superseded by Ext 1.0 and subsequently Ext 2.0. You won't really be able to find support for it anymore. I'd suggest you upgrade.

  8. #8

    Default

    Hi,

    How can you tell, it is quite old?

    If it is old, how can I upgrade to latest?

    Thanks for help.

  9. #9
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    It is old because newer versions were released.

    http://extjs.com/download

    http://extjs.com/learn

  10. #10

    Default

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •