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

Pages: [1]
1
So we are calling refreshDataAndView on the parent because if you look at the column "Sust Pac" The parent row has the total of "3,000.090" and then the two detail grid records are "1.000" and "2,999.090". If I update the detail grid record to be "2.000" instead of "1.000" I want the parent grid column of "3,000.090" to update to "3001.090" if that makes sense? Basically after the save we want to update the value of both grids and if we call the refresh just on the child then it doesn't update the parent records amount.

Thanks,
Joel

2
Hi There,

If I save a record in the child grid then it collapses it and you have to reopen it. Is there a way to stop this? After save we are calling "$(".vc-facility-detail").pqGrid("refreshDataAndView");"

Before save image is before save.jpg. Also I don't get how to attach pictures to the post with the whole "" thing.



 If we change the highlighted yellow column and save it then it looks like the aftersave.jpg image.


3
Still doesn't seem to be working unless i am missing something? I can't event get into the compare function to debug it. My code is below and as you can see in the attached screenshot it still is showing the data as [Object] [object]

{
                title: FI.res.fXRates.CalcConfigTypeLabel, dataType: "string", dataIndx: "FxCalcConfigType", editable: false, align: "left", minWidth: 150,
                render: function (ui) {
                    //Below line returns the value of the type value so that I don't have to do anything to the entity
                    return ui.rowData['FxCalcConfigType']['Value'];
                },
                filter: { crules: [{ condition: 'contain' }], listeners: ['keyup'] },
                conditions: {
                    contain: {
                        compare: function (cellData, val) {
                            if ((cellData.Value + "").indexOf(val) != -1) {
                                return true;
                            }
                            else {
                                return false;
                            }
                        }
                    }
                }
            },



4
Help for ParamQuery Grid (free version) / How to Filter on Nested Json
« on: August 21, 2020, 01:25:01 am »
Hi There,

So I have a few columns that are nested Json. For example the below column. I want to filter on "['FxCalcConfigType']['Value']" but can't get the filter to point to that value. Is this even possibly? I have been looking and have found nothing. Tried the value functionality in the filter and it did not help :(

{
                title: FI.res.fXRates.CalcConfigTypeLabel, dataType: "integer", editable: false, align: "left", minWidth: 150,
                render: function (ui) {
                    //Below line returns the value of the type value so that I don't have to do anything to the entity
                    return ui.rowData['FxCalcConfigType']['Value'];
                },
                filter: { crules: [{ condition: 'contain' }], listeners: ['keyup'] }
            },

5
Help for ParamQuery Pro / Re: Edit Export Data
« on: April 10, 2019, 10:52:30 pm »
You can delete/ignore this post found it upon further searching. Just had to use the "exportRender: false" in my column model!

6
Help for ParamQuery Pro / Edit Export Data
« on: April 10, 2019, 10:20:38 pm »
Hi There,

I am just wondering what the best approach to edit the data of a column for export is. By this I mean in my column model I have the following column:

 {
                title: GS.res.rail.LeaseCarEntry_Car_Label, dataType: "string", dataIndx: "Car", editable: false, align: "left", minWidth: 150,
                render: function (ui) {
                    if (ui.rowData.Car) {
                        var carIdentifier = ui.rowData.Car;
                        return '<a href="../RailTrace/Search?RailCarName=' + carIdentifier.replace(/\s/g, '') + '"&EventFromDate="' + null + '"&EventToDate="' + null + '" class="underline">' + ui.rowData.Car + '</a > ';
                    }
                },
                filter: { crules: [{ condition: 'contain' }], listeners: ['keyup'] }
            },

and then when I export this to excel the car row is displaying the whole return but I just want it to display the original ui.rowData.Car.

Thanks,
Joel

7
Can we not show the number display on sort order columns?
In the below result set i have 3 coulumns A,B,C and they are sorted by A,C,B where i dont want to see the number's on the coulmn header to say it is sorted by coulumn A first(1) and column C second(2)....
ColumnA1|ColumnB3|CoulumnC2|

Is there a way to supress the display of pq-grid-sort-count as im having around 8 coulmns and with group by being flexible for user creating confusion with sort numbering..

My Code is like below,

       var dataModel = {
            location: "remote",
            method: "GET",
            sortIndx: ["MarketCentre", "Facility", "Date", "AllocationProduct", "SalesRep", "ProducerName", "IsUnPlannedRecord", "BookingNo", "DeliveryNo"],
            sortDir: ["up", "up", "up", "up", "up", "up", "up", "up", "up"],
            getUrl: function () {
                var data;

                // serialize our search criteria
                $("form").serializeArray().map(function (x) {
                    data = data == null ? (x.name + "=" + x.value) : (data + "&" + x.name + "=" + x.value);
                });

                return {
                    // Build API url with search criteria in it
                    url: GS.uris.Allocation.GetJsonResult + "?" + data
                }

8
Help for ParamQuery Pro / How to freeze just headers
« on: March 26, 2019, 08:46:56 pm »
Hi there,

I'm looking to just freeze the header row of my pqgrid and was wondering how I would go about doing that? Whenever i scroll on the chrome browser the headers will not stay. Is it possibly because I am scrolling with chrome? You can see the attached screenshot but once I scroll past the headers they disappear.

Below is my code for grid settings, thanks:

 initializePqGrid: function () {

        let grid = $($('.vc-leasecarentry-grid')[0]);


        grid.pqGrid({
            colModel: GS.LeaseCar.entry.pqGridSettings.columnModel,
            dataModel: GS.LeaseCar.entry.pqGridSettings.dataModel,
            flexHeight: true,
            filterModel: {
                on: true,
                mode: "AND",
                header: true,
                menuIcon: true
            },
            menuIcon: true, //show header menu icon initially.
            menuUI: {
                tabs: ['filter'] //display only filter tab.
            },
            scrollModel: { autoFit: true },
            selectionModel: { type: 'row', mode: 'single' },
            hoverMode: 'row',
            title: '<span id=\"total_records\"></span>',
            stripeRows: true,
            columnBorders: true,
            roundCorners: false,
            numberCell: { show: false },
            showTop: true,
            editable: false,
            summaryTitle: { sum: "{0}" },
            load: function (event, ui) {
                CMN.utility.updateRecordsFound(ui);
            },
            toolbar: {
                items: [
                    {
                        type: 'button',
                        label: 'Toggle filter row',
                        listener: function () {
                            this.option('filterModel.header', !this.option('filterModel.header'));
                            this.refresh();
                        }
                    },
                    {
                        type: 'button',
                        label: 'Toggle filter row icon',
                        listener: function () {
                            this.option('filterModel.menuIcon', !this.option('filterModel.menuIcon'));
                            this.refresh();
                        }
                    },
                    {
                        type: 'button',
                        label: 'Toggle header filter icon',
                        listener: function () {
                            this.option('menuIcon', !this.option('menuIcon'));
                            this.refresh();
                        }
                    },
                    {
                        type: 'button',
                        label: 'Reset filters',
                        listener: function () {
                            this.reset({ filter: true });
                        }
                    },
                ]
            },

        });

        this.setDataPqGrid();
    },

setDataPqGrid: function (options) {

        let grid = $($('.vc-leasecarentry-grid')[0]);

        if (undefined !== options) {
            grid.pqGrid('option', 'dataModel.data', options.data);
            grid.pqGrid("refreshDataAndView");
        }
    },

9
Help for ParamQuery Pro / Re: Group Model static field
« on: March 12, 2019, 08:59:42 pm »
Thanks a ton for the quick reply!

Just out of curiosity is there documentation anywhere on what all the different attributes on the ui.rowdata are?

10
Help for ParamQuery Pro / Group Model static field
« on: March 12, 2019, 02:56:23 am »
Hi There,

If you look at the photo I have attached and scroll all the way to the right you will notice I have a group model but I have this notes Icon that is a shortcut to open up a modal window. I only want this to appear on top at the group level but not appear with the records when you expand the group model. I tried looking everyone on the website for a way to do this and could not find one. The code for this is below:


My group model and part of my column model are as follows:
            {
                title: GS.res.rail.LeaseCarEntry_ReportingRr_Label, dataType: 'string', dataIndx: 'RoadHandled',
            },
            {
                title: GS.res.rail.LeaseCarEntry_Consignee_Label, dataType: 'string', dataIndx: 'Consignee',
            },
            {
                title: GS.res.rail.LeaseCar_Lease_Flag_Label, dataType: 'string', dataIndx: 'LeasedFlag', maxWidth: 50
            },
            {
                title: "", editable: false, sortable: false, dataType: "string", exportRender: false, resizable: true, minWidth: 40, maxWidth: 30, nodrag: true, render: function (ui) {
                   
                        return "<a  class='vc-view-notes' vc-car-name='" + ui.rowData.Railcar + "'><span title='" + GS.res.rail.RailTrace_AllNote_Label + "' class=\"far fa-sticky-note awesomefont\" aria-hidden=\"true\"></span></a>";
                }
            },
        ],

         groupModel: {
             on: true, // grouping mode //
             dataIndx: ["Railcar"], // row groupring
             collapsed: [true],
             dir: ["up"],
             title: ["{0}"],
             summaryInTitleRow: true,
             titleInFirstCol: true,
             fixCols: false,
        }
    },

and then i initialize the grid with the following:

initializePqGrid: function () {

        let grid = $($('.vc-railtrace-grid')[0]);
       

        grid.pqGrid({
            colModel: GS.RailTrace.search.pqGridSettings.columnModel,
            dataModel: GS.RailTrace.search.pqGridSettings.dataModel,
            groupModel: GS.RailTrace.search.pqGridSettings.groupModel,
            flexHeight: true,
            scrollModel: { autoFit: true },
            selectionModel: { type: 'row', mode: 'single' },
            hoverMode: 'row',
            title: '<b>' + GS.res.rail.RailCarEvent_Search_Result_Title + '</b>',
            stripeRows: true,
            columnBorders: true,
            roundCorners: false,
            numberCell: { show: false },
            showTop: true,
            editable: false,
            toolbar: {
                items: [
                    {
                        type: 'button',
                        label: GS.res.common.ExpandAllLabel,
                        icon: 'ui-icon-plus',
                        listener: function (e) {
                            var collapsed = grid.pqGrid("option", "groupModel.collapsed");
                            for (var i = 0; i < collapsed.length; i++) {
                                collapsed = false;
                            }
                            grid.pqGrid('refreshView');
                        }
                    },
                    {
                        type: 'button',
                        label: GS.res.common.CollapseAllLabel,
                        icon: 'ui-icon-minus',
                        listener: function (e) {
                            var collapsed = grid.pqGrid("option", "groupModel.collapsed");
                            for (var i = 0; i < collapsed.length; i++) {
                                collapsed = true;
                            }
                            grid.pqGrid('refreshView');
                        }
                    },
                ]
            }
        });
       
    },

Pages: [1]