Hi,
I have set the disabled property of my button to true, but the click event is still being triggered…. The button is in the toolbar of the grid. It shows as disabled, but then when you click on it the modal pops up.
Can you see if there is something obvious I am missing?
thanks,
nja
== Initializing the button
var saveButton = $("<div style='float: left; margin: 5px;'><span style='margin-left: 4px; position: relative; '>Save</span></div>");
container.append(saveButton);
toolbar.append(container);
== inside the rendertoolbar: function (toolbar)
if ("<?php echo $this->item->status ?>" == "Submitted") {
saveButton.jqxButton({ width: 60, height: 15, theme: 'darkblue', disabled: true });
}
else {
saveButton.jqxButton({ width: 60, height: 15, theme: 'darkblue' });
}
== Click event
saveButton.click(function (event) {
//close any cell open for editing
var cell = $('#jqxgrid').jqxGrid('getselectedcell');
if ((typeof(cell)!='undefined') && (cell != null)){
var editable = $("#jqxgrid").jqxGrid('endcelledit', cell.rowindex, cell.datafield, false);
}
// open save dialog
$('#myIsDirtyModal').modal({ keyboard: false });
});