ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: MEngelbyPQ on September 21, 2018, 12:11:10 am
-
I have grid where the column Model has a detail column. Is there a way to prevent the detailGrid from expanding when the detail icon is clicked on in the row?
Based on the rowData I have logic that determines if the detailGrid will be valid or not and I'm wondering if there is a way to to prevent the grid from opening when there is no data to show for the detail?
-
There is beforeRowExpand event to do that.
https://paramquery.com/pro/api#event-beforeRowExpand
-
Many thanks. I was able to add it during initialization with:
$('#selector').pqGrid({beforeRowExpand: function(evt, ui) {
if (ui.rowData.lastread == 'NOT CURRENT') {
return false;
}
return true;
}});