I found when datagrid was loaded,the onLoadSuccess event fired twice.
<script type="text/javascript">
$('#test').datagrid({
url:'datagrid_data1.json',
method:'get',
onLoadSuccess:function(data){
alert(1);
$('.datagrid-header td:contains(de)').click(function(){
alert(2);
});
}
});
</script>
When I refresh page, the output displays "1" twice.
why? In my mind, onLoadSuccess event should fire only once.