I am trying to put a context menu to a datagrid but the event causes another POST method to the server. My Javascript for putting context menu is as following:
$(document).ready(function() {
$('#dg').datagrid({
onRowContextMenu:function(e, field){
e.preventDefault();
$('#mm').menu('show', {
left: e.pageX,
top: e.pageY
});
}
});
});
I have tried the above javascript in the onLoadSuccess event of Datagrid, but still the same. Attached you can see in the firebug which shows two post to get JSON data.
Please help!