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

Pages: [1]
1
Help for ParamQuery Pro / Re: Calling server using Ajax
« on: November 11, 2015, 11:22:45 pm »
-Got it working.

The problem was in obj model. The dataModel should have pointed to the base of the object.

var obj = {
                bootstrap: { on: false },
                numberCell: { resizable: true, title: "#", width: 30, minWidth: 30 },
                editor: { type: 'textbox' },
                title: "ParamQuery Grid with JSON Data",
                dataModel:dataModel ,
                colModel: colModel,
                resizable: true,
                scrollModel: { autoFit: true, theme: true }
            };

2
Help for ParamQuery Pro / Re: Calling server using Ajax
« on: November 11, 2015, 11:14:21 pm »
Hi, thanks for the reply.
i changed the url.

Still it doesn't call the server at all!

Any other suggestion? Is there a working sample project ?

Thanks.

3
Help for ParamQuery Pro / Calling server using Ajax
« on: November 11, 2015, 08:28:34 pm »
Hi i am still very new to paramquery. I am using MVC  .net 4.5
i have gone through tutorials and set up a grid with getData to retrive data from the server. But the grid is not calling the server at all. Specially not after the initialising the page.
As a test i have set an ajax function which correctly calls the server and retrieves the data.
Any help would be much appreciated.
Here is the code i am using
        $(function () {
           
            var colModel = [
                { title: "ProductID", width: 100, dataType: "integer", dataIndx: "ProductID" },
                { title: "ProductName", width: 200, dataType: "string", dataIndx: "ProductName" },
                { title: "QuantityPerUnit", width: 150, dataType: "integer", align: "right", dataIndx: "integer" },
                { title: "UnitPrice", width: 150, dataType: "float", align: "right", dataIndx: "UnitPrice" },
                { title: "UnitsInStock", width: 150, dataType: "integer", align: "right", dataIndx: "UnitsInStock" },
                { title: "UnitsOnOrder", width: 150, dataType: "integer", align: "right", dataIndx: "UnitsOnOrder" },
                { title: "ReorderLevel", width: 150, dataType: "integer", align: "right", dataIndx: "ReorderLevel" },
                { title: "Discontinued", width: 150, dataType: "boolean", align: "right", dataIndx: "Discontinued" }
            ];

           
            var dataModel = {
                location: "remote",
                sorting: "remote",
                dataType: 'json',
                method: "GET",
                contentType: 'application/json; charset=UTF-8',
                getUrl: function() {
                    return '/Products2/GetAllData';
                },
               
                getData: function(dataJson) {
                   

                    return { data: JSON.parse(dataJson.data)};
                }

            }


            var obj = {
                bootstrap: { on: false },
                numberCell: { resizable: true, title: "#", width: 30, minWidth: 30 },
                editor: { type: 'textbox' },
                title: "ParamQuery Grid with JSON Data",
                dataModel: { data: dataModel },
                colModel: colModel,
                resizable: true,
                scrollModel: { autoFit: true, theme: true }
            };

  $("#grid_json").pqGrid(obj);

// also tried the following call. Neither of which invoke a call to the server!

var gridInfo = $("#grid_json").pqGrid({
                width: 900,
                height: 400,
                collapsible: false,
                pageModel: { type: "local", rPP: 20, strRpp: "{0}", strDisplay: "{0} to {1} of {2}" },
                selectionModel: { type: 'cell' },
                data: dataModel,
                colModel: colModel,
                wrap: false,
                hwrap: false,
                //freezeCols: 2,           
                numberCell: { show: false, resizable: true, title: "#" },
                title: "Shipping Orders",
                resizable: true
            });


 });



4
Help for ParamQuery Pro / Re: Bootstrap dependency
« on: November 10, 2015, 10:07:37 pm »
Thanks. That's all I was after. I wouldn't like to use bootstrap.

5
Help for ParamQuery Pro / Bootstrap dependency
« on: November 05, 2015, 07:05:29 pm »
Hi I am very new to pqGrid but so far it is brilliant.
Just one area which is regarding bootstrap dependency specially for mobile phones.
I appreciate it is a personal preference but for me bootstrap is far too big for mobile sites.

Is there a list of css class dependencies ? so they could be cover in other frameworks?
Also apart from css classes are there any other bootstrap dependencies?

Many thanks. Well done guys. It does look pretty good.



Pages: [1]