-
Notifications
You must be signed in to change notification settings - Fork 21
resolveRows
caneruguz edited this page Nov 14, 2014
·
1 revision
| Option | Default | Explanation |
|---|---|---|
| Function | returns a title row | Defines how rows of data will be displayed. |
| Table Options | Type | Explanation |
|---|---|---|
| data | String | The property from your data object that the information for this column is populated with |
| filter | Boolean | Whether this column should be included while filtering |
| folderIcons | Boolean | Pre-set folder icons that can be used for your implementation of the grid |
| custom | function | Custom functions that can be applied to this column, a Mithril object must be returned |
###Example:
var options ={
...
resolveRows : function (item) {
return [ // Defines columns based on data
{
data : "title", // Data field name
folderIcons : true,
filter : true
},
{
data : "person",
filter : true
},
{
data : "age",
filter : false
},
{
data : "action",
sortInclude : false,
custom : function (row, col) {
var that = this;
return m("button.btn.btn-danger.btn-xs", {
onclick: function _deleteClick(e) {
e.stopPropagation();
that.deleteNode(row.parentID, row.id);
}
}, " X ");
}
}
];
},
...
}
<li><a href="https://github.com/caneruguz/treebeard/wiki/Quickstart">Quickstart</a></li>
<li>
<a href="https://github.com/caneruguz/treebeard/wiki/Options">Options</a>
<ul>
<li><a href="https://github.com/caneruguz/treebeard/wiki/divID">divID</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/filesData">filesData</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/rowHeight">rowHeight</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/paginate">paginate</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/paginateToggle">paginateToggle</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/uploads">uploads</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/multiselect">multiselect</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/columnTitles">columnTitles</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/resolveRows">resolveRows</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/hoverClass">hoverClass</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/showFilter">showFilter</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/title">title</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/Drag-and-Drop-options">Drag and Drop</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/sortButtonSelector">sortButtonSelector</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/onfilter">onfilter</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/onload">onload</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/togglecheck">togglecheck</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/onfilterreset">onfilterreset</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/createcheck">createcheck</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/oncreate">oncreate</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/deletecheck">deletecheck</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/ondelete">ondelete</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/addcheck">addcheck</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/onadd">onadd</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/onselectrow">onselectrow</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/onmouseoverrow">onmouseoverrow</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/ontogglefolder">ontogglefolder</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/resolveIcon">resolveIcon</a></li>
</ul>
</li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/Item-API">Item API</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/Treebeard-API">Treebeard API</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/Modal">Modal</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/Notify">Notify</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/using-dropzone">Using Dropzone</a></li>
<ul>
<li><a href="https://github.com/caneruguz/treebeard/wiki/resolveUploadUrl">resolveUploadUrl</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/resolveLazyloadUrl">resolveLazyloadUrl</a></li>
</ul>
<li><a href="https://github.com/caneruguz/treebeard/wiki/Styling-the-Grid">Styling the Grid</a></li>
<li><a href="https://github.com/caneruguz/treebeard/wiki/FAQs">FAQs</a></li>