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

Pages: [1]
1
Thanks for your assistance..

i tried to reference just the js and css files as given in your tutorial without using npm...

still i face the same issue.

but when i publish the code to iis and run it works from iis.

is there any step by step procedure on how to install in visual studio. would be of great assistance please.


2
Hi

I am new to VISUAL STUDIO

Is there any how to document to add param query grid package using package manager in visual studio.

Nuget package lists old version of param query.

i had downloaded the latest version and tried adding in VS solution - it says undefined param query while running the application.

appreciate, if you could assist by step by step procedure.

3
Hi

I had downloaded the latest version of PQ grid. created a new visual studio 2019 project.

as instructed in web site, tried using npm i pqgrid and have copied all files in solution.

when i tried running sample code it says cannot find type definition in TS file.

sample project screenshot attached.

please assist.



Thanks
Jay
---

4
Bug Report / Param Query Eval displayed in teh application
« on: March 24, 2020, 11:12:25 am »
Hi

param Query pro eval message is displayed on the bottom right corner of the application - how to fix this please

5
Help for ParamQuery Pro / Re: How to create aew button in nested grid
« on: December 10, 2019, 08:54:59 pm »
I have downloaded the latest version of the PQGRID two weeks ago...

You can let me know, where to check for the version, as I cannot find it in the read me file as part of download

6
Help for ParamQuery Pro / Re: How to create aew button in nested grid
« on: December 10, 2019, 10:28:53 am »
please refer the code below:


for main grid the add button appears but for the child grid the add button doesnt appear..

    $(function () {
        function onTabsActive(evt, ui){
            //grid requires refresh whenever corresponding tab is refreshed.
            ui.newPanel.find(".pq-grid").pqGrid("refresh");
        };
        /**
        * does data binding of detail view.
        * @return: {jQuery object}
        */
        function initDetail( ui ) {
            var rowData = ui.rowData,               
                //get a copy of gridDetailModel
                detailobj = gridDetailModel( rowData ),
                //get markup of the detail template.               
                html = $("#tmpl").html(),
                //create new detail place holder
                $detail = $("<div/>");


            for (var key in rowData) {
                var cellData = (rowData[key] == null) ? "" : rowData[key];
                html = html.replace("<#=" + key + "#>", cellData);
            }
            $detail.html(html);

            $detail.find(".pq-tabs").tabs().on("tabsactivate", onTabsActive);

            //append pqGrid in the 2nd tab.               
            $("<div/>").appendTo($("#tabs-2", $detail)).pqGrid( detailobj );

            return $detail;
        };

        var $gridMain = $("div#grid_md").pqGrid({
            width: 800, height: 550,
            dataModel: {
                location: "remote",
                sorting: "local",
                dataType: "JSON",
                method: "GET",
                url: "/pro/orders/get",
                //url: "/pro/orders.php",//for PHP
                getData: function (dataJSON) {
                    var data = dataJSON.data;
                    //expand the first row
                    data[0]['pq_detail'] = { 'show': true };
                    return { curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: data };
                }
            },
            colModel: [
                { title: "", minWidth: 27, width: 27, type: "detail", resizable: false, editable: false /* no need to mention dataIndx */ },
                { title: "ShipCountry", width: 100, dataIndx: "ShipCountry" },
                { title: "Customer Name", width: 120, dataIndx: "ContactName" },
                { title: "Order ID", width: 100, dataIndx: "OrderID", dataType: "integer", editable: false },
              { title: "Shipping Via", width: 100, dataIndx: "ShipVia" },
                { title: "Freight", width: 100, align: "right", dataType: "float", dataIndx: "Freight" },
                { title: "Shipping Name", width: 160, dataIndx: "ShipName" }
            ],
            pageModel: { type: "local", rPP: 50, rPPOptions: [10, 15, 50], strDisplay: "{0} to {1} of {2}" },
            title: "<b>Shipping Orders</b>",
            toolbar: {
                items: [
                    { type: 'button', icon: 'ui-icon-plus', label: 'Add Product', listener:
                        { "click": function (evt, ui) {
                            var $grid = $(this).widget() //('.pq-grid');
                            addRow($grid);
                        }
                        }
                    }
                ]
            },
            resizable: true,
            wrap: false,
            hwrap: false,           
            virtualX: true, virtualY: true,
            editable: false,
            selectionModel: { type: 'cell' },
            detailModel: { init: initDetail }
        });

        /* another grid in detail view.
        * returns a new copy of detailModel every time the function is called.*/
        var gridDetailModel = function( rowData ){
           
            return {
                pageModel: { type: "local", rPP: 5, strRpp: "" },
                dataModel: {
                    location: "remote",
                    sorting: "local",
                    sortIndx: "ProductName",
                    dataType: "jsonp",
                    method: "GET",                   
                    url: "/pro/orderdetails/get?orderId=" + rowData.OrderID
                },
                colModel: [
                    { title: "Order ID", width: 70, dataIndx: "OrderID" },
                    { title: "Product ID", width: 90, dataType: "integer", dataIndx: "ProductID" },
                    { title: "Product Name", width: 230, dataIndx: "ProductName" },
                  { title: "Unit Price", width: "150", align: "right", dataIndx: "UnitPrice", dataType: "float",
                      summary: {
                          type: ["sum"],
                          title: ["<b style='font-weight:bold;'>Total Price:</b> ${0}"]
                      }
                  },
                  { title: "Quantity", align: "right", width: 105, dataIndx: "Quantity", dataType: "integer",
                      summary: {
                          type: ["sum"],
                          title: ["<b style='font-weight:bold;'>Total Qty:</b> {0}"]
                      }
                  },
                  { title: "Discount", width: 80, align: "right", dataIndx: "Discount", dataType: "float" }
              ],
                editable: false,
                groupModel: {
                    dataIndx: ["OrderID"],
                    dir: ["up"],
                    title: ["{0} - {1} product(s)"],
                    icon: [["ui-icon-triangle-1-se", "ui-icon-triangle-1-e"]]
                },
                flexHeight: true,
            toolbar: {
                items: [
                    { type: 'button', icon: 'ui-icon-plus', label: 'Add Product', listener:
                        { "click": function (evt, ui) {
                            var $grid = $(this).widget() //('.pq-grid');
                            addRow($grid);
                        }
                        }
                    }
                ]
            },
                width: "100%",
                numberCell: { show: false },
                showTop: false,
                showBottom: false
            };
        }
    });

7
Help for ParamQuery Pro / How to create aew button in nested grid
« on: December 09, 2019, 10:44:02 pm »
Appreciate your assistance in teh following...

I have created a main grid and one child nested grid. main Grid toolbar is visible and I am able to add button to add new rows and the same works fine.

Queries:
1. I am not able to get the toolbar for my child grid.
2. if the toolbar is created - how to add a button to facilitate addtion to the child grid.

tried the below from forum FAQ - it doesn't work for me

 toolbar: {
                                items: [
                                    {
                                        type: 'button', icon: 'ui-icon-plus', label: 'New', listener:
                                          {
                                              "click": function (evt, ui) {
                                                  debugger;

                                                  var $gridDet = $(this).closest('.pq-grid');

                                         
                                                  //append empty row at the end.
                                                  var rowData = { ID: "2", 'Name':'Has'}; //empty row
                                                  var rowIndx = $gridDet.pqGrid("addRow", { rowData: rowData, checkEditable: true });
                                                  $gridDet.pqGrid("goToPage", { rowIndx: rowIndx });
                                                  $gridDet.pqGrid("editFirstCellInRow", { rowIndx: rowIndx });
                                              }
                                          }
                                    }

                                ]


Pages: [1]