javascript - Declarative dojox.grid.datagrid's header has onclick event? -
- is possible have onclick in dojox.grid.datagrid's header.
i tried calling function in header's onclick.. doesn't work.
<div class="claro" id="cvsd" name="datagrid" onclick="getconnect('inner__cvsd');setwidgetproperty(this.id,'xy','inner__cvsd');" ondblclick="editcustomgrid(this.id)" onmouseup="setdocstyle(this.id)" style="height: 200px; left: 44px; position: absolute; top: 114px; width: 950px;"> <table class="claro" dojotype="dojox.grid.datagrid" id="inner__cvsd" rowselector="10px" style="height: 180px; width: 400px;"> <thead> <tr> <th field="column1" id="column1_2" width="100px" onclick="getconnect();"> column1 </th> </tr> </thead> </table> <input id="hidden__cvsd" name="datagrid" style="display:none;" type="hidden">
there's event called onheadercellclick
job. if need more information events , such things recommend reading api documentation. wrote example jsfiddle (grid created programmatically, can declarative too) can find here.
the code use call event following:
onheadercellclick: function() { console.log("header clicked"); },
but of course, can change whatever like.
Comments
Post a Comment