Recent Posts

Pages: 1 ... 7 8 [9] 10
81
Bug Report / Re: Please change one line of code in next version
« Last post by paramvir on October 30, 2024, 01:07:15 pm »
Noted, thanks.
82
Suggest new features / Re: In Render allow jQuery object to be returned
« Last post by jplevene on October 29, 2024, 11:22:26 pm »
I might want to return something like:

Code: [Select]
var  that=this,
      jq = $("<span>", {html"O"})
   .click(function(e){ that.do_something(this); })
   .data("dta", {"id":2, "name":"O"})
   .add(
       $("<span>", {html"X"})
       .click(function(e){ that.do_something_else(this); })
       .data("dta", {"id":2, "name":"O"})
   );

return {jquery: jq};

I can't do above passing HTML.
83
The listeners work (I have made them work), and I have done them, but an option would be easier and would 100% work on new versions.

I also had to write the code below to prevent from doing 2 remote calls for the same filter, the second being triggered by the timeout:

Code: [Select]
var rule = { condition: ui.column.filter.crules[0].condition,  dataIndx: ui.column.dataIndx, value: ui.value, value2: ui.value2 },
CM = this.grid.pqGrid("getColModel");

// Check if the filter is not already applied
for(var i=0, len = CM.length; i < len; i++){
// If there is no change
if( CM[i]["dataIndx"]===ui.column.dataIndx && ui.value===CM[i]["filter"]["crules"][0]["value"] && ui.value2===CM[i]["filter"]["crules"][0]["value2"] )
rule = null;
}

// If we have a rule, apply it
if(rule)
this.grid.pqGrid("filter", {
oper: "add",
rules: [
rule
]
});

The issue is that with new versions, the above might end up not being compatible.

Also you promised to add the "X" in the column input filter to clear the text.  When you do this, my code might end up being incompatible.
84
Suggest new features / Re: Customise the "showLoading"
« Last post by jplevene on October 29, 2024, 11:05:57 pm »
My current way of doing it is:

Code: [Select]
(function($) {
var fn = $.paramquery._pqGrid.prototype;
fn.showLoading = function() {
if(this.$grid_center.is(":visible"))
{
this.loading = true;
open_loading_overlay();
}
};
fn.hideLoading = function() {
this.loading = false;
close_loading_overlay();
};
})(jQuery);

It's not an issue to do above, but an easier way would be nice and it would be standard across versions.
85
Bug Report / Re: Please change one line of code in next version
« Last post by jplevene on October 29, 2024, 11:01:03 pm »
If you need the code:

Code: [Select]
$("#grid").pqGrid("showLoading").pqGrid("refreshDataAndView");
86
Bug Report / Re: Please change one line of code in next version
« Last post by jplevene on October 29, 2024, 06:44:41 am »
Found the bug.  It is caused by calling "showLoading" before loading remote data.

The issue is that this.loading is true, but at this point there is no XHR, thus the bug and the reason the fix works.
87
Bug Report / Re: BUG v.10.0.0 filter.title
« Last post by jplevene on October 29, 2024, 06:32:29 am »
Tried this but no success on the error

https://jsfiddle.net/v0418zyj/3/
88
Bug Report / Re: Another v10.0.0 bug with fix
« Last post by jplevene on October 29, 2024, 06:06:54 am »
Found out how to get the bug

https://jsfiddle.net/v0418zyj/1/

Before you click the show button, open the browser console then resize the screen.  You will see the error:

Uncaught TypeError: Cannot read properties of undefined (reading 'htContClient')

To fix this and other similar ones when the grid is hidden:


Code: [Select]
calcTopBottom: function(left) {
if(typeof(this.dims)==="undefined") return 0;
...

getTop: function(ri, actual) {
var top = this.topArr ? this.topArr[ri] : 0,
...

getLeft: function(_ci, actual) {
if(typeof(this.leftArr)==="undefined") return 0;
...
89
Bug Report / Re: Bug in 10.0.0 autocomplete not filtering
« Last post by MichalV on October 29, 2024, 01:41:41 am »
Nice job.. That fixed all the issues!
Many thanks for your quick support  :)
90
The grid body / header cells are not re- redrawn when the browser is resized as can be observed in the example:

https://paramquery.com/pro/demos/filter_header_local
Pages: 1 ... 7 8 [9] 10