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

Pages: 1 ... 8 9 [10]
136
Suggest new features / Cross in the search
« on: December 12, 2023, 01:10:01 am »
A simple and quick solution is for v9.1.1, the filter is an input and type="text".  If you make that type="search" and when the "search" event (triggered when user clicks the X) is triggered do the same event as a keypress

137
Help for ParamQuery Pro / Re: v9.1.0 bug
« on: December 11, 2023, 09:53:59 pm »
I can't reproduce it with https://jsfiddle.net/qtw0z1s5/4/, can I post a private link as I'm finding it hard to source the bug.

138
Help for ParamQuery Pro / Re: v9.1.0 bug
« on: December 08, 2023, 10:07:08 pm »
I discovered that this is due to column render and when I have a hidden grid, lets say using jQuery UI tabs, and the grid is not inside the open tab.

PQ Grid is trying to draw the results of the render, when it should ignore applying to the DOM if the grid is hidden.

This is also a bug in 9.1.1

P.S. Love the new lines in tree view, but it would be nice to have an option for solid without having to change the CSS.  However going from dotted to solid leaves a gap between vertical lines.

139
Help for ParamQuery Pro / missing class "pq-focus-mgr" on the textarea
« on: December 08, 2023, 09:46:31 pm »
The focus textarea no longer has the class "pq-focus-mgr", so when I detect a body keypress, the target is a textarea with no class to distinguish what it is.

In 9.0.2, only the parent div has the class "pq-focus-mgr" and not the textarea like before.

140
Help for ParamQuery Pro / Re: v9.1.0 bug
« on: November 30, 2023, 01:45:23 am »
The demo worked fine and I tested on Chrome Version 119.0.6045.199 (Official Build) (64-bit) & Version 119.0.6045.200 (Official Build) (64-bit)

I use the render for columns so I think this where the issue is.

141
Help for ParamQuery Pro / topArr
« on: November 29, 2023, 10:33:25 pm »
Worked fine with 9.0.0, upgraded to 9.1.0 and got the following console error for each grid (see attached).  I changed it to 9.0.2 and it worked fine, so only 9.1.0 has the issue:

Uncaught TypeError: Cannot read properties of undefined (reading '0')
    at pq.cRenderBody.getTop (pqgrid.min.js:34:3135)
    at pq.cRenderBody.getTopSafe (pqgrid.min.js:34:3308)
    at pq.cRenderBody.setPanes (pqgrid.min.js:34:26214)
    at e.<computed>.<computed>.<anonymous> (pqgrid.min.js:34:22372)
    at p (pqgrid.min.js:9:10322)
    at t._trigger (pqgrid.min.js:9:10797)
    at pq.cRenderSum.setPanes (pqgrid.min.js:34:29047)
    at pq.cRenderSum.init (pqgrid.min.js:34:28444)
    at pq.cRenderBody.init (pqgrid.min.js:34:21325)
    at b.paramquery.cRefresh.refresh (pqgrid.min.js:9:126087)

142
Help for ParamQuery Pro / Re: filter->conditions compare to use other data
« on: November 28, 2023, 05:59:16 pm »
This won't work as we build the contents using live and changing data that is shared between tables. 

Also for speed improvements we have turned off spread sheet functions due to the number of rows, as well as other reasons.

Also the help for rowTemplate has no details or examples.

143
Help for ParamQuery Pro / filter->conditions compare to use other data
« on: November 27, 2023, 08:28:09 pm »
In the "compare" I only have access to (cellData, val1, val2), however I need to also take into account data in other other columns as my filter column is rendered using multiple data sources.

How can I do this, besides completing the column data externally.

Code: [Select]
filter: {
    conditions: {
        range: {
            compare: function(cellData, val1, val2) {
                // need to access ui here to get other column data
            }
        }
    }
}

144
Help for ParamQuery Pro / Re: Need to be able to select text in a column
« on: November 08, 2023, 10:45:20 pm »
Sorry, I didn't make myself clear, I just need to select and copy the text in a single cell in one specific column.

I also need the row to select as in my example.  I just want the browser text editor to select text inside a cell so that I can right click and use the browser copy.  Setting
Code: [Select]
selectionModel: { type:"row", mode:"single", column:false, all:false}, I want to keep and I don't want to be selecting cells, I just want to select a bit of text inside a cell like I can on this forum page by clicking on some text and dragging the cursor.

145
Help for ParamQuery Pro / Need to be able to select text in a column
« on: November 08, 2023, 01:15:50 am »
I have a basic grid setup as below, however I want to be able to select the text in the "code" column so that CTRL+C can be pressed to copy it.  Is that possible?  Notice it is select row and there are check boxes.

Code: [Select]
.pqGrid({
dataModel: {data: []},
colModel : [
{dataIndx:"state", maxWidth:30, minWidth:30, align:"center", resizable:false, title:"", menuIcon:false, type:"checkBoxSelection", cls:"ui-state-default", sortable:false, editor:false, dataType:'bool',
                    cb: {
                        all: true, // Checkbox selection in the header affect current page only.
                        header: true // Show checkbox in header.
                    }
                },
{dataIndx:'qty', maxWidth:80, dataType:"float", editable:false},
{dataIndx:'code', maxWidth:100, editable:false},
{dataIndx:'something', maxWidth:150, editable:false}
],
numberCell: {show: false},
menuIcon: false,
scrollModel:{autoFit:true}, // show scroll
flex: {on:true}, // Width of headers auto fit
width: "100%",
height: "100%",
hoverMode: "row",
dragColumns: {enabled:false},
showTitle: false,
            showToolbar: false,
showTop: false,
wrap: true, // Cell content on one line
hwrap: false,
selectionModel: { type:"row", mode:"single", column:false, all:false}, // Select rows !!!!
virtualWin: true,
rowClick: function(event, ui) {
// Must be a data row
if(!empty(ui.rowData))
{
// It will be true, false or undefined
var checked = ui.rowData["state"];
// Edit the row and toggle the state (checkbox)
that.infoGrid.pqGrid("updateRow", {rowIndx:ui.rowIndx, newRow:{"state":!checked} });
}
},
check: function(event, ui) {
that.change_info_grid_checked();
},
groupModel: {
on: true,
header: false,
grandSummary: true,
agg: {
qty: 'sum'
}
},
summaryTitle:{ count: "{0}", sum: "{0}" ,avg:"{0}" }
});

146
I have 3 columns in a grid "time", "username" and "title":

Code: [Select]
colModel : [
{dataIndx:'time', maxWidth:48, title:lang.timeTxt, dataType:"date",
render:function(ui){
return {
text: moment(ui.cellData).format("LT"),
attr: 'title="'+moment(ui.cellData).format("LLL")+'"'
};
}
},
{dataIndx:'username', maxWidth:52, title:lang.userTxt, dataType:"stringi", filter:{crules:[{condition: 'contain'}], style:"text-align:"+dir},
render:function(ui){
return {
text: String(ui.cellData),
attr: 'title="'+String(ui.cellData).replace('"', '\"')+'"'
};
}
},
{dataIndx:'title', title:lang.descriptionTxt, dataType:"stringi", filter:{crules:[{condition: 'contain'}], style:"text-align:"+dir},
render:function(ui){
var txt = (empty(ui.rowData["qty"])?"":ui.rowData["qty"]+" x ") + ui.cellData + (empty(ui.rowData["barcode"]) ? "" : " ("+ui.rowData["barcode"]+")");
return {
text: txt,
attr: 'title="'+txt.replace('"', '\"')+'"'
};
}
}
]

I insert a new row with the following:
Code: [Select]
$grid.pqGrid("addRow", {newRow:rowData, rowIndx:0});
The issue is that the fields in rowData are being removed if the field is in the colModel.

Before:
Code: [Select]
{
barcode: "2616",
box: 0,
error: true,
id: 0,
qty: 0,
time: "2023-08-06 22:06:25",
title: "<a href='/modules/stock/equipment.php?asset=816' target='_blank'>Slick Litebox (2m, LX2000) (2616)</a> is damaged",
user_id: 1,
username: "User's name"
}

After (I added a console.log(ui.rowData) in the render and the rowInit to get the data):
Code: [Select]
{
barcode: "2616",
box: 0,
error: true,
id: 0,
pq_hideOld: undefined,
pq_render: 1,
pq_ri: 0,
pq_top: undefined,
qty: 0,
user_id: 1
}

As you can see all the data is there, but the fields that match a column in the colModel have been removed.  I can show you the console view to prove it.  I get exactly the same with addNodes.

However it does work if I add the parameter checkEditable:false in the "addRow" options.



147
I found the issue, it is due to a Chrome bug (https://bugs.chromium.org/p/chromium/issues/detail?id=1466893#c_ts1689983830)

The issue is that pqGrid, when there is a refresh or refreshView, pqGrid recreates its contents, so instead of just refreshing the grid and not the header, it does both.  This means that the selected filter gets destroyed (so it rightfully loses focus) then recreated.  We need a refreshGrid that doesn't refresh the header rows, which would fix this.

However, I did create a fix

Code: [Select]
// Get the name of the focused filter
var focus = $(grid).find("input.pq-search-txt:focus),
      focused_name= focus.attr("name");
// Do any grid refresh
$(grid).pqGrid("refresh");
// Now find the newly created filter input and select it
if(focused_name) $(grid).find("input.pq-search-txt[name="+focused_name+"]").focus();


148
ParamQuery Pro Evaluation Support / Re: Grid auto width scroll bars
« on: May 18, 2023, 07:11:52 pm »
Thanks Paramvir,

Regarding point 1, is there any way to set some columns as fixed width, make the grid try and fill the full width, however if it is too wide due to the fixed width columns, enable horizontal scrolling?  Other grids like jqGrid get around this.

J

149
ParamQuery Pro Evaluation Support / Re: Grid auto width scroll bars
« on: April 22, 2023, 01:05:21 am »
Answering my own question regarding hiding the "undefined" for no rows, just set the following CSS:

Code: [Select]
.pq-grid-norows { display:none;}

150
ParamQuery Pro Evaluation Support / Grid auto width scroll bars
« on: April 22, 2023, 12:54:05 am »
I have set the following options:

   stripeRows: true, // Show stripes
      menuIcon: false,
      scrollModel:{autoFit:true},
      flex: { on: true },
      showTitle: false, // Hide table title
      wrap: false, // Cell content on one line
      hwrap: false, // header content on one line
      showTop: false, // Hide top  (including col move icons)
      selectionModel: { type:"row", mode:"single", column:false, all:false}, // Select rows
      wrap: false,

I also have some columns with min and max width set.  The issue is that due to the min and max width, when the grid is not wide enough to fit all the columns, there is no horizontal scroll bar, instead the far right columns are clipped off screen.  I need the flexible auto width to the screen, and when that is not possible (minimum width due to column width constraints), the horizontal scroll bar should appear instead of clipping the grid.

Also, when the data is empty, as in dataModel: {data: []}, how do I remove/hide or disable the "undefined" message?

Pages: 1 ... 8 9 [10]