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.

Topics - argo

Pages: [1]
I have a link (anchor) in a cell that is put there using the column's render() function. In general I'm using the grid rowClick event to bring up additional details about the row selected. However, in this case if the user clicks the anchor tag in that one special column I want to cancel the rowClick at the grid level so I can do something different. I've attempted to use the rowClick's event object to look at the target, but even when the anchor tag is clicked the event target is still the entire row...I assume the event target would be the anchor but it isn't. I've also tried placing my own jQuery event listener on those anchor tags using the .on() method and using the event cancelPropogation() hoping this would prevent the anchor tag click from registering on the row. The event handler registeres, but the cancelPropogation doesn't stop the grid rowClick event from firing.

Any ideas how I might go about doing this?

News / What's new in 2.2.0?
« on: September 16, 2014, 01:27:48 am »
Saw you released v2.2.0 but can't find anywhere you've posted the release notes.

Help for ParamQuery Pro / enable multi-column sort via modifier key only
« on: September 16, 2014, 12:24:39 am »
I need to support multi-column sorting but I only want it to work if the user utilizes a modifier key (like shift-click, ctrl-click, or alt-click). When the user does not use a modifier key, I need each column click to sort just the one column and undo any previous column sorting.

In testing, my users found the default behavior very confusing. They expected each column click to immediate sort just that one column unless they specifically used an option to do a multi-column sort (users suggested shift-click and ctrl-click).

Any thoughts on how to accomplish this without modifying the api?

Help for ParamQuery Pro / Customize the No rows to display message
« on: August 21, 2014, 01:49:38 am »
Didn't see anything in the API to customize this. I've got multiple grids on the same page and need to identify the content type specifically when there aren't any rows. For example, initialize a grid so that when there are no rows it'll display "No events were found" without modifying the other grids on the same page.

Help for ParamQuery Pro / continous triggers of refresh event
« on: August 12, 2014, 01:17:22 am »
I have a function I'm calling when the grid event "refresh" is triggered. I have two grids, each of them is on a different jQuery tab. Sometimes when I switch between the tabs (including a tab that doesn't have a grid), it will result in the pqGrid refresh event on one of the grids being called non-stop, almost like it's in a loop. It'll keep doing this until I click another tab, then go back to the grid, at which time the loop will usually (but not always) stop.

I've analyzed the event object being passed to the refresh event and it is the exact same object every time, the only thing that changes is the timeStamp value. The event type passed in is "pqgridrefresh", and the event target is always the <div> DOM element that contains the grid.

Can you suggest some troubleshooting steps that will help me determine what is causing the non-stop event triggers? Maybe something I can write to the console from within the refresh event function that will tell me what is triggering the event?

Help for ParamQuery Pro / modifying select options dynamically
« on: August 06, 2014, 11:17:56 pm »
Is there an example showing how to modify the built in <select> options when using the inline editor?

What I'm trying to do is disable certain <option> tags based on another column value.  In the editor I'm doing:
var $cell = ui.$cell;
var $s = ui.$cell.find("select");
$s.find("option").each(function() {
 // this is where I dynamically add/remove the "disabled" property of the <option> as needed based on the ui.rowData values

This DOES result in a changed DOM element for the <select>. The problem is that the entire <select> becomes unresponsive. The grid displays the select but when I click it, nothing happens. But if I hit the space bar, it'll open up just fine. Somehow modifying the <option> tags dynamically makes the <select> unresponsive to click events. I know the loop above to modify the options is working because when I open the <select> with the space bar, I can see that the correct options are disabled.

Help for ParamQuery Pro / custom select editor that automatically opens
« on: August 06, 2014, 07:52:51 pm »
Is there any way to have the select box automatically open as soon as the cell goes into edit mode?

I'm returning a custom <select> using code like the following in the editor function:

var $cell = ui.$cell;
var sel;
// code here to create <select> HTML code in the sel variable

The custom <select> does properly show up in the cell and is operational, but I need the <select> to be opened automatically as soon as the user enters edit mode. I've tried
$cell.find("select").trigger("click") but nothing happens.

I've searched in the forum assuming this must have been answered before but I couldn't find anything relevant.

I need to know when the the grid has completed all tasks associated with changing a selection. I first tried to use rowSelect but the problem was that when an already selected row is ctrl-clicked, it becomes unselected which changes the set of selected rows but the rowSelect event doesn't fire. Or if someone SHIFT-clicks a set of rows, then the rowSelect fires for every single row even though the user's action (at least from their perspective) was only to make one selection change.  But if I use rowClick, then when someone uses CTRL-A to select all (or I make selections programmatically without a 'click') the rowClick event isn't triggered. And if I use a combination of rowSelect and rowClick, then I get multiple event triggers when someone goes from having several rows selected to only 1.

Basically, when pqgrid is done making all the changes to a selection, I want to fire a method once. It only needs to fire once per change in selection. I'm struggling to find the right combination of the available events to do this. I tried debouncing the multiple function calls but didn't have any success.

Any thoughts?

Help for ParamQuery Grid (free version) / pq_rowselect not working
« on: June 03, 2014, 07:10:24 pm »
I'm building a "Select All" button for the grid that is meant to select all rows in the entire data model, regardless of how many are actually displayed on the page. I originally built the function using the selection method, but that turns out to be very slow when there are thousands of rows. From the post I read below, the selection method isn't designed for that. The solution in the post below is to use the pq_rowselect property:

I've implemented as the post indicates but when I refresh the grid there are no rows selected. The grid remains unchanged. And if I check the selection size afterward the # of rows returned selected is zero. Here is the code I'm using:

Code: [Select]
function selectAllQuestions() {
var DM = $qgrid.pqGrid("option","dataModel");
if ( > 0) {
for (var i=0;i<;i++) {
var rowData =[i];
rowData.pq_rowselect = true;


Any ideas?

Help for ParamQuery Grid (free version) / scroll to top record
« on: September 03, 2013, 11:31:22 pm »
Basic question, is there a way to get the grid to scroll to the top record?

I'm using a paginated grid that also has a vertical scroll bar. Whenever I programatically filter the records (I call "refreshDataAndView" afterward) or the user goes to another page in the recordset, the grid does not automatically scroll back to the top record. This is problematic because if the last page has only a few records, when they get to the last page only 1 record is initially shown. This makes it appear that only 1 record exists when there are actually more than 1. The user has to manually scroll up in order to see the rest of the records on the page. When I filter questions and call "refreshDataAndView", I'd like it to scroll to the top as well.

I'm checking row values after the cellsave event and, if required, submitting them to the server to be updated. My pqgrid data comes from a json dataset loaded from the server when initialized. Here's an example of how I'm retrieving the updated data in the cellsave event:

var myUpdatedValue =[rowIndx].myProperty;

The problem is that the value returned from is the HTML escaped content. For example, if someone types an ampersand it come back as "&amp;" rather than &. How can I retrieve the unescaped content of the cell?

My grid is created from an array of objects (json). I'm adding a bulk-edit functionality based on the selected rows. In order to commit changes based on the selected rows, I need the primary key of each selected row. This primary key is also displayed as a column in the grid. I can determine which rows are selected using:
myGrid.pqGrid( "selection", { type:'row', method:'getSelection' } )

However I can't find a way to select the primary key directly from the source data. I tried using the "getRow" method on each selected row and parsing the returned TR to extract the key value, but it doesn't appear that you can select rows that are hidden (i.e. if some of the selected rows are on a previous page). This can happen if someone clicks a row on page 1, then goes to page 2 and shift-clicks a row. In this case, the "selection" method may say that 5 rows are selected, but the "getRow" method can only get the rows on the current page, not the ones on a previous page. Maybe I'm going about this wrong.

Is there a way to go directly to the json data objects that correspond to the selected rows? If not, is there a way to turn off multi-selection across multiple pages?

Help for ParamQuery Grid (free version) / changing array of source data
« on: August 08, 2013, 05:34:34 pm »
I'm using pqgrid to display a json data set. I'm loading the json data through a separate function and supplying that as the value. I'm using separate filter controls on the page that determine which records should be displayed. Based on the filters the user applies, I'm altering which rows exist in the data and setting a new value for dataModel.length. I then call the "refreshDataAndView" method. The issue is that it works only if the array size gets smaller. For example, I can start with 1500 rows of data, filter to 100 (or any number less than 1500). But as soon as I go back up (say back to 101 rows), I get an error from the pqgrid script saying "unable to get the value of the property 'hidden'': object is null or undefined".

I feel like I'm having a senior moment and forgetting something obvious. Any ideas?

In troubleshooting I've even gone down the path of "destroy"ing the entire pqgrid object, then recreating it with the updated data and it still throws the same error.

Pages: [1]