how do arguments work with dojo.connect?

Posted by sprugman on Stack Overflow See other posts from Stack Overflow or by sprugman
Published on 2010-04-02T15:30:13Z Indexed on 2010/04/02 15:33 UTC
Read the original article Hit count: 344

Filed under:
|

I've read the docs, but I must be missing something. I've got a grid, I want to connect to the event that fires when the column headers are clicked for sorting, thus:

    dojo.addOnLoad(function(){
        var grid = dijit.byId("grid");
        dojo.connect(grid, "setSortInfo", 'afterSort');
    });

    function afterSort() {
        console.info('after sort');
    }

That works fine as far as it goes. I know the setSortInfo method has an argument which is the column number. How do I get that value? I've tried putting a parameter in the sig for afterSort to no avail. The docs say "the method receives the same arguments as the event", but where are they???

© Stack Overflow or respective owner

Related posts about dojo

Related posts about JavaScript