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 - argo

Pages: [1] 2 3
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?

2
Help for ParamQuery Pro / Re: Tooltip in pq-grid-header
« on: November 02, 2015, 10:01:56 pm »
Awesome. Thanks!

3
Help for ParamQuery Pro / Re: Tooltip in pq-grid-header
« on: October 31, 2015, 01:47:44 am »
This doesn't allow the entire header to have a tooltip, only the text itself. For example, if the column header is two rows in size but one column is only a single row of text, the entire blank area below the header text won't trigger the tooltip.

Is there a way to add a tooltip to the entire column header rather than just the content within the title?

4
Help for ParamQuery Pro / Re: enable multi-column sort via modifier key only
« on: September 18, 2014, 02:04:49 am »
I slightly tweaked the code in the fiddle to meet my exact needs, but the event handler worked perfectly. Thank you!

For anyone that wants the same solution, I also added SHIFT-CLICK as a handled behavior, so the line is now:

 if (evt.ctrlKey || evt.shiftKey)

5
Help for ParamQuery Pro / Re: enable multi-column sort via modifier key only
« on: September 16, 2014, 10:37:32 pm »
Awesome suggestion. I'll look into that. Thanks!

6
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.

7
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?

8
Help for ParamQuery Pro / Re: Customize the No rows to display message
« on: August 21, 2014, 06:21:24 pm »
Thanks. Is there a list of options that can be set that aren't officially documented in the api? I ask because I looked for this option in the api documentation first, assuming it might be there.  I didn't realize I could initialize the grid by passing in these options as well which is very helpful.

For anyone else, you can set the 'no rows to display' string at initialization like this:

var obj = {
     // all your other grid settings
     strNoRows : 'Nothing to show'
}
$("mydiv").pqGrid(obj);

I wanted to style it and had to explicitly pass in the css styles like this:

strNoRows : '<div style="font-size:18px;margin-top:20px;">Nothing to show</div>'

9
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.

10
Help for ParamQuery Pro / Re: continous triggers of refresh event
« on: August 14, 2014, 08:32:38 pm »
Thanks for the offer. I know that would help troubleshoot but it would be a big task to do that. This app is huge and the page won't run without the core framework which relies on server side code as well. I'm putting off a solution to this for a few weeks so I can move on to other parts of the app. I plan to circle back and address the issue a little later and see what I can come up with. I'll post again when I get to it, whether I find a solution or not. Your support is very much appreciated.

11
Help for ParamQuery Pro / Re: continous triggers of refresh event
« on: August 12, 2014, 11:58:21 pm »
Sure thing.

The column HTML is a span element that is pre-caculated. Here's an example column value:
Code: [Select]
<span class="sparklines" sparktype="pie" sparkwidth="22" sparkheight="22" sparkslicecolors="[#00dd00,#ff0000,#eeee00,#777777]" sparkborderwidth="0" values="0,1,1,4"></span>
In the grid definition, I have the following:

Code: [Select]
refresh:function(event,ui) {
   setTimeout(function() {
      $('#datatable .sparklines').sparkline('html',{enableTagOptions:true,disableHiddenCheck:true});
   },200);
}

I'm was using the setTimeout function so that the table will display faster for the user, then the charts show up a split second later. Without the setTimeout the table takes longer to display. I tried it without the setTimeout() at all and the problem appears to be less frequent, but I can still get it stuck in a refresh loop if I poke at it long enough.

If this continues, I'll try to setup a static size for height and width (rather than % or auto) and see if that fixes it. Although of course I'd prefer not to build my own size management code. I'd rather use the work you put into the grid to have it auto size  :)

I'll try the autoSizeInterval too if things aren't working out...I prefer not to use an undocumented feature unless I absolutely have to.

Any other thoughts are welcomed, this issue is driving me a little nuts.

BTW, I'm only seeing this on IE8 so far (my minimum supported platform). I haven't been able to recreate it on Chrome or IE10.

12
Help for ParamQuery Pro / Re: continous triggers of refresh event
« on: August 12, 2014, 09:22:35 pm »
Yes, commenting out my sparkline rendering code does stop the loop, so it definitely has something to do with the sparkline rendering.

Grid height is set to 100%-3 and grid width is set to auto. I have a column width specified on every column in pixels. I've tried that setup with flexWidth true and false. Doesn't matter what flexWidth is, the loop still happens. It's just so odd that this issue isn't 100% repeatable. Most of the time everything works and the charts render without any issue, but if I switch between tabs enough I can definitely get it to happen.

Can you elaborate a bit on what the autoSizeInterval option does?

Another thought...is it possible to stop the grid from responding to the window.resize event, or at least stop it from triggering the refresh event due to a window.resize? I'm not sure of the implications of doing that, which is why I ask.

Thanks for the support too!

13
Help for ParamQuery Pro / Re: continous triggers of refresh event
« on: August 12, 2014, 07:54:19 pm »
UPDATE:

I just observed it happening without any user interaction. I had the page open, viewing the grid with the sparkline charts in each row. The mouse wasn't even moving, and after about 10 seconds of inactivity the refresh event started triggering in a loop.

14
Help for ParamQuery Pro / Re: continous triggers of refresh event
« on: August 12, 2014, 07:07:49 pm »
Hmm, the code in my refresh trigger does make a change to some DOM elements that are within the cells of the grid. The code renders a small sparkline chart in the cells, but it doesn't explicitly call the grid refresh event.

Here's literally what I'm doing.  I'm using the render function on a column to return a <span> element. That <span> element will be turned into the sparkline after the grid is drawn. So whenever the grid refreshes (i.e. column sort), I call the function that renders the charts. This works fine most of the time, but about 10-20% of the time when I switch between tabs the grid refresh event suddenly gets stuck in the loop.

So the general follow-up question: Is it possible that changing a DOM element in the grid after the grid is already drawn can cause the grid's refresh event to fire?

15
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?

Pages: [1] 2 3