Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - srmooney

Pages: [1]
1
Suggest new features / Re: Filter tree parent rows only
« on: February 11, 2021, 06:35:45 pm »
I was able to get it working using the "filter" event.
Do you see any issues with the below?

Code: [Select]
$grid.on('pqGrid:filter', function (e, ui) {
if (ui.rules.length > 0) {
var grid = gridAPI.grid;
var DM = grid.options.dataModel;
var includeRows = [];
DM.data.forEach(function (row) {
//Find the children for this row
var rowChildren = DM.dataUF.filter(function (x) {
return x.parentId == row.ROLE_ID;
});

//remove the children from the unfiltered data
DM.dataUF = DM.dataUF.filter(function (el) {
return !rowChildren.includes(el);
});

//Match the hide state of children to the parent close state
row.pq_close = true;
rowChildren.forEach(function (value) {
value.pq_hidden = row.pq_close;
});

//add the children back to the row
row.children = row.children.concat(rowChildren);

//add to list of children to include in data
includeRows = includeRows.concat(rowChildren.filter(function (el) { return !DM.data.includes(el); }));
});

//update data with the children we added
DM.data = DM.data.concat(includeRows);

//sort the data again
DM.data = grid.iSort.sortLocalData(DM.data);
}
});

2
Suggest new features / Filter tree parent rows only
« on: February 09, 2021, 06:46:02 pm »
Is there a way to apply the filter to the parent row only when using the tree model?
We would like to be able to see all children for the parent row that is shown based on he filter(s) set.

3
Help for ParamQuery Pro / Re: Prevent fill of certain cells
« on: July 24, 2020, 09:21:02 pm »
That works, thank you!

4
Help for ParamQuery Pro / Prevent fill of certain cells
« on: July 24, 2020, 07:03:29 pm »
Hello,

Is there a way to prevent certain cells being "filled" when using the fill handle?
We want the user to only be able to fill certain cells. We have this started by using the "beforeFillHandle" event to limit what cells have the fill handle and we restrict the filling to "horizontal".
Is there another event that we can use to prevent or revert a cell that we don't want to be filled?

i.e. the first column in our grid is the users name, then after is a column for every week that they have request with the hours for the week. We want them to only be able to "fill" the week columns.


Pages: [1]