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

Pages: [1] 2
1
Ok, I'll try it.

Thanks  8)

2
Hi,

I want to use PQ as a spreadsheet, then I can design it like Excel, and can load remote datas show in it.

Can PQ support the features described in the picture ?

3
Help for ParamQuery Pro / How to trigger grid resize by manual?
« on: July 24, 2021, 04:09:29 pm »
Hello,

How to trigger grid resize by manual?

Use `refresh()` or `refreshDataAndView()` or `refreshView()` ?  `.resize()` method not found in api-methods.

4
Thanks,  it's ok  :)

5
Help for ParamQuery Pro / How to select the whole column by colIndx ?
« on: July 15, 2021, 06:55:42 pm »
Hello,

I want to set the whole column selection state by colIndx.

I use 
Code: [Select]
grid.setSelection({colIndx: 1})   function to select the column, but it occur error, it must has rowIndx property.

When I use 
Code: [Select]
grid.setSelection({rowIndx: 0, colIndx: 1}) function, it only select the body data cell[0,1]  not the whole column.

How to select the whole column by colIndx ?


6
Hello paramvir,

Can I use ParamQuery to achieve the table capabilities in the picture?

1. supports  add formulas on column ?

2. header label left and right position add customize icon and dropdown menu?

7
Help for ParamQuery Pro / How freezeCols right side columns?
« on: June 23, 2021, 02:54:13 pm »
hi, Paramvir:

How freezeCols right side columns?

8
Hello,
How do I make the scroll bar automatically scroll down to the bottom(the new row position) , when add a new row dynamically ?

9
Bug Report / autoFit to fail
« on: December 15, 2020, 06:44:52 am »
hi paramvir:

Using pqgrid in react, if you use the on-demand loading method, cVirtual.setSBDim(); this method will have a loading delay problem, causing the getSBWd method to return pq.cVirtual.SBDIM as undefined, so in autoFitCols wdCont = NaN (wdCont = dims.wdCenter-sbWidth), causing autoFit to fail

10
When I config dataModel with "contentType: 'application/json'" as:

Code: [Select]
dataModel: {
location: 'remote',
url: '/news',
contentType: 'application/json; charset=UTF-8',
postData: {"author":"jack", "isTopic": 1},
dataType: 'JSON',
method: 'POST'
}


I found pqgrid ajax send data is "x-www-form-urlencoded" format (author=jack&isTopic=1), not JSON-String payload format ({"author":"jack", "isTopic": 1}).

In fact, ajax should send JSON-String payload format data use JSON.stringify(postData) when contentType is "application/json".

Now, I must config beforeSend to reset send data format:


Code: [Select]
beforeSend: function(xhr, settings) {
  settings.data = JSON.stringify({....});
}

Is this a bug?

11
I found it is jquery-ui's bug:
Code: [Select]
_isLocal: ( function() {
var rhash = /#.*$/;

return function( anchor ) {
var anchorUrl, locationUrl;


anchorUrl = anchor.href.replace( rhash, "" );
locationUrl = location.href.replace( rhash, "" );

// Decoding may throw an error if the URL isn't UTF-8 (#9518)
try {
anchorUrl = decodeURIComponent( anchorUrl );
} catch ( error ) {}
try {
locationUrl = decodeURIComponent( locationUrl );
} catch ( error ) {}

return anchor.hash.length > 1 && anchorUrl === locationUrl;
};
} )()


The bug in this method:

_isLocal: ( function() {
   var rhash = /#.*$/;

   return function( anchor ) {
      var anchorUrl, locationUrl;

      //Bug here:
      //eg visit url: http://127.0.0.1:5500/pqgrid.html
      //If no <base href="">, anchor.href = http://127.0.0.1:5500/pqgrid.html#xxx, and anchorUrl=http://127.0.0.1:5500/pqgrid.html
      //If exists <base href="./">, anchor.href = http://127.0.0.1:5500/#xxx, and anchorUrl=http://127.0.0.1:5500/
      //

      anchorUrl = anchor.href.replace( rhash, "" );
      locationUrl = location.href.replace( rhash, "" );

      // Decoding may throw an error if the URL isn't UTF-8 (#9518)
      try {
         anchorUrl = decodeURIComponent( anchorUrl );
      } catch ( error ) {}
      try {
         locationUrl = decodeURIComponent( locationUrl );
      } catch ( error ) {}

      //So, if exists <base href="">, anchorUrl != locationUrl, and it's not a local, this is the bug!!!
      return anchor.hash.length > 1 && anchorUrl === locationUrl;
   };
} )()

12
My page contains <base href="./" /> element,  and pqgrid header menu cannot be shown correctly: Each click on the header menu icon will trigger all css,js in the page to reload, and occur error.
Code: [Select]
<html>
<head>
<!-- a bug here -->
<base href="./" />

<link rel="stylesheet" href="jquery-ui.css" />
        <link rel="stylesheet" href="pqgrid.min.css" />
   
<script src="jquery.min.js"></script>
<script src="jquery-ui.min.js"></script>
        <script src="pqgrid.min.js"></script>
</head>

<body>
<div id="grid_json" style="margin:100px;"></div>

<script>
$(function () {
var data = [
{ rank: 1, company: 'Exxon Mobil', revenues: 339938.0, profits: 36130.0 },
{ rank: 2, company: 'Wal-Mart Stores', revenues: 315654.0, profits: 11231.0 }
];
var obj = {
numberCell:{resizable:true,title:"#",width:30,minWidth:30},
title: "ParamQuery Grid with JSON Data",
menuIcon: true,
scrollModel:{autoFit:true}
};
obj.colModel = [
{ title: "Rank", width: 100, dataType: "integer", dataIndx: "rank" },
{ title: "Company", width: 200, dataType: "string", dataIndx: "company" },
{ title: "Revenues ($ millions)", width: 150, dataType: "float", format: '$#,###.00', dataIndx: "revenues" },
{ title: "Profits ($ millions)", width: 150, dataType: "float", format: '$#,###.00', dataIndx: "profits" }
];
obj.dataModel = { data: data };
$("#grid_json").pqGrid(obj);
});
</script>
</body>
</html>

13
Help for ParamQuery Pro / About colModel width
« on: November 25, 2020, 01:08:10 pm »
Why does colModel width not work when options width ='100%'?

14
The pop-up window effect as shown

15
hi, ask two questions:
1. Can the content of the pop-up window be customized?
2. Is there a callback method after the pop-up window is closed?

Pages: [1] 2