Reputation: 3
Is there a way to bring headers in the column and on click of the header, the attributes associated with the header in a different column using Dojo?
Thanks Kumar
Upvotes: 0
Views: 222
Reputation: 312
you can use the event onHeaderCellClick
onHeaderCellClick: function()
{
console.log("do what you want");
}
to add the header, you can do it easily in declarative way like this:
<table data-dojo-type="dojox.grid.DataGrid">
<thead>
<tr>
<th field="fieldName" width="200px">Column Header</th>
</tr>
</thead>
</table>
If you are using declarative way you can use the attribute onHeaderCellClick to your table, onHeaderCellClick="func" call function func().
Upvotes: 1