Created
April 16, 2015 19:49
-
-
Save cogentParadigm/a37422a57d53f8b05707 to your computer and use it in GitHub Desktop.
dgrid selector column
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["dojo", "dojo/on", "dojo/aspect", "sb", "put-selector/put", "dgrid/selector"], | |
function(dojo, on, aspect, sb, put, selector){ | |
dojo.global.starbug.grid.columns = dojo.global.starbug.grid.columns || {}; | |
dojo.global.starbug.grid.columns.selector = function(column){ | |
//populate the cell with the label or value | |
column.renderCell = function(object, value, cell, options){ | |
put(parent && parent.contents ? parent : cell, ".dgrid-selector"); | |
}; | |
column.selectorType = "checkbox"; | |
column = selector(column); | |
aspect.after(column, "renderHeaderCell", function(node) { | |
put(node, '.dgrid-selector'); | |
}, true); | |
return column; | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment