I have a dgrid like following code, my second field is a Tree, I need call a XHR when user to click tree’s icon. How can I catch this event?
Thanks
var CustomGrid = declare([OnDemandGrid, Keyboard, Selection, Pagination]);
var grid = new CustomGrid({
columns: [
selector({label: "#", disabled: function(object){ return object.type == 'DOCx'; }}, "radio"),
{label:'Id', field:'id', sortable: false},
tree({label: "Title", field:"title", sortable: false, indentWidth:20}),
{label:'Count', field:'count', sortable: false}
],
store: memoryStore,
pagingLinks: false,
pagingTextBox: true,
firstLastArrows: true,
pageSizeOptions: [10, 15, 25],
selectionMode: "single", // for Selection; only select a single row at a time
cellNavigation: false // for Keyboard; allow only row-level keyboard navigation
}, "grid");
I have found the solution looking at the dojo’s code.
There is a file called mouse.js in dgrid/util, there you can find others examples like these:
So, for my case I have just added:
Now you can test the new events in Grid_mouseevents.html in dgrid/test.
regards.