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

Pages: [1] 2 3 ... 6
1
Bug Report / Header filter value disappears for currency format £0
« on: March 15, 2021, 06:57:34 pm »
With a currency column format like this

{ title: "Value £", align: "center", dataIndx: "value", dataType: "float", editable: false, hidden: false, format: "£#.00", filter: { crules: [{condition: 'between'}]} }

If you enter 0 in the left filter box (so any values greater than £0 are listed) a grid refresh causes the left filter box to appear empty although the 0 is still being applied.

I have confirmed this on your own demo https://paramquery.com/pro/demos/filter_header after adding currency format in your freight column and changing filter to 'in between'.

If another value, like 1, is entered into the left filter box, the filter box correctly displays £1.00 even after a refresh.  Also if 0 is entered into the right-side filter box the entry is correctly displayed as £0.00 and does not disappear following a refresh.

The above problem also occurs for the filter type 'greater than'.

Do you have a workaround until this bug is fixed?

2
Bug Report / Re: Export to Excel with Nesting colModel
« on: October 09, 2020, 06:43:07 pm »
You can verify this for yourself using your "Export nested grids" demo at https://paramquery.com/pro/demos/export_detail

Replace lines 114-115
Code: [Select]
                { title: "Ship Country", width: 100, dataIndx: "ShipCountry" },
                { title: "Shipping City", width: 100, dataIndx: "ShipCity" },

with a nested colModel like this
Code: [Select]
{ title: "Where", minWidth: 120, align: "center", colModel: [
        { title: "Ship Country", width: 100, dataIndx: "ShipCountry" },
            { title: "Shipping City", width: 100, dataIndx: "ShipCity" }
]},

Then your export to Excel will have column headers misaligned with column data and the icon for expanding detail will appear in the Excel column 1 as
Code: [Select]
<div class='ui-icon ui-icon-plus'></div>

3
Bug Report / Export to Excel with Nesting colModel
« on: October 09, 2020, 01:38:20 am »
Part of my grid uses a nested colModel like

Code: [Select]
{ title: "Physical Difference", minWidth: 120, align: "center", colModel: [
{ title: "Quantity", minWidth: 80, align: "center", dataIndx: "diffqty", dataType: "integer", editable: false, hidden: true,
filter: { crules: [{condition: 'between'}]},
},
{ title: "Value £", minWidth: 80, align: "center", dataIndx: "diffval", dataType: "float", editable: false, hidden: false, format: "£#.00",
filter: { crules: [{condition: 'between'}]},
}
]},

When I export the whole grid to Excel the column headers are out of line with the data columns and I find the 'details' icon is exported as the first column like this...

Code: [Select]
<div class='ui-icon ui-icon-triangle-1-e glyphicon glyphicon-plus'></div>
... even though the details column is marked with 'copy: false'

Code: [Select]
{ title: "", minWidth: 27, maxWidth: 27, type: "detail", resizable: false, copy: false, editable: false, menuIcon: false, menuInHide: true },

Is this a bug?  Is there a workaround?  Have I missed something in the colModel api?

Many thanks for your assistance.

Regards, Tony

4
I changed it to single listener, but it doesn't trigger from the menuUI icon.

Code: [Select]
{ title: "Oldest Count", minWidth: 175, dataIndx: "oldestcount", align:"center", editable: false, dataType:"integer",
render: formatDate,
filter: { crules: [{condition: "between"}],
init: uiDatePicker,
listener: function(evt, ui) {
ui.value = millisecondsFromShortDate(ui.value);
ui.value2 = millisecondsFromShortDate(ui.value2);
this.filter({
oper: "add",
rules: [ui]
})
}
}
}

The original header filter box with datepicker works fine and triggers the listener, but using the filter build into the menuUI icon selects a date, but doesn't trigger the listener and so sends a raw date string rather than the millisecond timestamp that I should get from the listener.  I've included all the code for the column in colModel...should I be putting the filter listener somewhere else like inside filterModel?

5
I've been using the standard header filter for a long time with a listener to convert from a datepicker to a millisecond timestamp.

Code: [Select]
{ title: "Oldest Count", minWidth: 175, dataIndx: "oldestcount", align:"center", editable: false, dataType:"integer",
render: formatDate,
filter: { crules: [{condition: "between"}],
init: uiDatePicker,
listeners: [{ 'change': function(evt, ui) {
ui.value = millisecondsFromShortDate(ui.value);
ui.value2 = millisecondsFromShortDate(ui.value2);
$(evt.target).closest(".pq-grid").pqGrid('filter', {
oper: "add",
rules: [ui]
})
}}]
}
}

When I use the datepicker in the MenuUI filter the colModel filter listener does not trigger.  Is there a listener for the MenuUI filter?  Alternatively, can you advise how I can intercept the MenuUI filter to convert the datepicker into a millisecond timestamp before the remote request is triggered by the filter?

Thanks in advance.

6
Hello, my Excel export requires company part numbers formatted as text so that Excel keeps the leading zeros in the company part numbers.  I notice that when using your workaround code...

Code: [Select]
format: function(val){
return " "+val;
},

... that it is not compatible with column filter with a placeholder in the attribute...

Code: [Select]
filter: {  attr: 'placeholder = "search..."', crules: [{condition: 'contain'}]}
I have tested it on your demo for remote header filter  https://paramquery.com/pro/demos/filter_header  and it recreates the same problem.

The problem is that the format introduces a 'space' character into the filter textbox which automatically replaces the placeholder text.

In order to be able to avoid using workaround fixes for Excel export will you be able to introduce an "excelformat" option into the colModel to take standard Excel formatting types "Text", "Number", "Accounting", "Scientific", etc?  Or perhaps simply use the colModel dataType to tell Excel that string=text and float=numeric?

7
Help for ParamQuery Pro / Re: Merge Data from two Remote Sources
« on: November 20, 2017, 12:33:31 am »
Ok, I thought so.  Thanks for your time.

Your 'search' method was actually really helpful though, so I'm using that as I step through each entry from the second remote source.

   
Code: [Select]
var searchRow = grid.search({ row: {partnumber: sdPartnumber}, first: true });
Many thanks.

Tony

8
Help for ParamQuery Pro / Merge Data from two Remote Sources
« on: November 17, 2017, 09:07:36 pm »
I'm sorry I'm about to ask a really lazy question...

The data for my grid is coming from two remote sources, each providing data in json suitable for dataModel.data.  The first source populates the left side of my grid and the second source populates further detail on the right side of the grid.  The sources share a common data element which I use in the first column.

Do you have any method in your grid functions which automatically merges two json sources that share a common data element such as "id", or must I loop through each row, finding a match then merging using something like .extend?

Many thanks.  Again, sorry for asking such a lazy question  :-[

9
Thanks, that's great.  I'll upgrade my software again soon...I'm still on v3.4.1


10
Can you please confirm whether any of the versions of ParamQuery Grid have the option to export numbers yet, or is it still only possible to export as String?  Having read through some of the updates I wondered if exportRender was the thing but it's not helping for me.  Many thanks.

11
Bug Report / Re: Problem after export to Excel
« on: April 16, 2017, 05:04:51 pm »
Thanks for your confirmation of the bug.

12
Bug Report / Problem after export to Excel
« on: April 07, 2017, 02:02:53 am »
After exporting a grid to Excel (version 3.3.2) the Excel file opens up ok with the correct columns and all my data.  The data is all in a single Excel worksheet tab and there are no other tabs.  When I click to add a new tab I get the following error message in Excel "That command cannot be used on multiple selections."

Can you confirm that you observe the same issue?  If so, do you know why it is doing that?  Google suggests that there is corruption in the file, but I have not modified the file since it was exported from ParamGrid.

This is the code I use to export the Excel file...

Code: [Select]
{ type: 'separator' },
{
type: 'select',
label: 'Format: ',               
attr: 'id="export_format"',
options: [{ xlsx: 'Excel', csv: 'Csv', htm: 'Html', json: 'Json'}]
},
{
type: 'button',
label: "Export",
icon: 'ui-icon-arrowthickstop-1-s',
listener: function () {
pageModel.type = 'local';
this.option( "pageModel", pageModel);
this.refreshDataAndView();
this.one('load', function() {
var format = $("#export_format").val(),                           
blob = this.exportData({
//url: "/pro/demos/exportData",
format: format,                               
render: true
});
if(typeof blob === "string"){                           
blob = new Blob([blob]);
}
saveAs(blob, "Transactions."+ format );
pageModel.type = pageModelType;
this.option( "pageModel", pageModel);
this.refreshDataAndView();
});
}
},

Many thanks for your assistance.

Tony

13
Help for ParamQuery Pro / Re: columnSelector in detail grid (child)
« on: January 17, 2017, 03:19:52 pm »
Works perfectly.  Fantastic. Thanks.

14
Help for ParamQuery Pro / columnSelector in detail grid (child)
« on: January 17, 2017, 01:14:56 am »
I'm using the pqSelect style column selector in a child grid the same as I would for the mainGrid.  Each time the child grid is expanded the new class "detailcolumnSelector" works fine and the detail grid 'load' event sets up the entries and the pqSelect conversion.  My problem is that when I then open a second detail grid the first detailGrid loses the column options from the selector, and the second detail grid column Selector now works instead.  So every new details grid works fine, but the old and still open grids lose the column selector functionality.

I thought that as they all share the same class "detailcolumnSelector", and the fact they all share the same colModel structure as well, that all instances of the class would act simultaneously...but instead only the latest opened detailGrid operates correctly whilst the old ones stop working.

I don't know if I've given you enough to work with here, but do you know if what I'm trying to do is even possible?  Do you have any samples of grids with rows of details grids that use the column selector within the details grids?

Many thanks in advance.

15
Help for ParamQuery Pro / Re: Switch to local pageModel for Excel Export
« on: December 21, 2016, 01:10:23 am »
Thank you for showing me how to put the functionality back into the toolbar button.  It makes a lot more sense to keep that functionality with the button and remove the globals.  The style you showed works well and keeps the code/structure much more readable.

Pages: [1] 2 3 ... 6