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

Pages: 1 2 3 [4] 5 6 ... 9
It will be better if pqGrid can make it a build-in function, I'm surprised for having to do it manully.

Help for ParamQuery Pro / Readonly grid
« on: May 17, 2022, 08:28:39 am »
Would you like to show me how to make pqgrid a readonly spreadsheet conveniencely?
Now I have to set editable property as false one col by one col.

In the code of demo, I didn't find the code for saving envent.Would  you like to provide save event sample code for treegrid batch editing?
When I use saving mothod of common grid, pqGrid send json of all records to server when I changed the topnode. It seems that the item property of json is unnesassary.

Here is the json that pqGrid sent to server:
,"items":[{"eachLevel":5,"id":"8","name":" Planner ","pid":"7","sn":"SCJHY","pq_level":4,"parentId":"7","pq_ri":4,"pq_hidden":false,"pq_ht":35}]
,"name":" Planning Supervisor ","pid":"6","sn":"SCJHZG","pq_level":3,"parentId":"6","pq_ri":3,"pq_hidden":false,"pq_ht":35}]
,"name":" Planning Manager ","pid":"5","sn":"SCJHJL","pq_level":2,"parentId":"5","pq_ri":2,"pq_hidden":false,"pq_ht":35}]
,"name":" Operation Director","pid":"3","sn":"SCYYZJ2","pq_level":1,"parentId":"3","pq_ri":1,"pq_hidden":false,"pq_ht":35,"pq_cellcls":{"sn":"pq-cell-dirty"}}]
,"name":"Planning Supervisor","pid":"6","sn":"SCJHZG","pq_level":3,"parentId":"6","pq_ri":3,"pq_hidden":false,"pq_ht":35}]
,"name":"Planning Manager","pid":"5","sn":"SCJHJL","pq_level":2,"parentId":"5","pq_ri":2,"pq_hidden":false,"pq_ht":35}]
,"name":"Operation Director","pid":"3","sn":"SCYYZJ2","parentId":"3"}]

Suggest new features / Default value in colModel
« on: May 12, 2022, 03:56:13 am »
Now it seems that default value couldn't be set in colModel for new row of every column. Can it be added?
Then developer may get better experience in programing like following:
var colModel= [
         {title: "ID", dataIndx: "id", width: 200,dataType: "string",  editable: false },
         {title: "Country", dataIndx: "Country",width: 260, dataType: "string",default:"USA"},
         {title: "City", dataIndx: "City",width: 260, dataType: "string",default:"New York"}

Help for ParamQuery Pro / Re: Head filter listenner
« on: May 03, 2022, 05:37:48 am »
Thank you for kindly help, I will try it.

Help for ParamQuery Pro / Re: Head filter listenner
« on: April 30, 2022, 06:53:06 pm »
In head filter, filter action is triggered automatically even when filterbox got one letter change , this is will send server many unnesessary requests. Can it be stopped? Then it can be trigger in need.

Help for ParamQuery Pro / Re: Head filter listenner
« on: April 29, 2022, 01:51:16 pm »
In head filter, filter action is triggered when filterbox got change automatically, this is a problem. Can it be stopped? Then it can be trigger in need.

Help for ParamQuery Pro / Head filter listenner
« on: April 28, 2022, 11:21:50 am »
In head filter, filter action is triggered when filterbox got change. Is it possible to trigger filter action when TAB or ENTER keys are pressed?
Could you like to show me how to intercept the listenner of head filter change envent

Many thanks for new demo. But if developer forgets setting limit-in-list for pqSelect, user in browser client maybe mistakely copy a lot of unhoped data to pqSelect column and save into database,for the value of select is changed but its text show nothing and these trouble-data will never be showed in interface in the future.
Maybe this should be treated as a bug.

By the way the configuration of pqSelect is a little complicated. Maybe it can be reduced to only configure one or two parameter instead of  dozens rows, unlesss user has very tricky requirement.
Maybe you can have a look for Jquery Easyui, even its grid function is not so powerful as pqGrid, but its style for easy-using impressed me deeply. Every line is for the need of business instead of software itself.

Help for ParamQuery Pro / Re: How to shrink size the delete button
« on: February 01, 2022, 03:52:41 am »
This idea can do reduce the height of the button and make no trouble for row height, but the cissors icon is not in the middle vertically any more. My code is as follow:
             { title: "删除", editable: false, minWidth: 123, sortable: false,
               render: function (ui) {return "<button type='button' class='delete_btn'></button>";},
              postRender: function (ui) {
                  var rowIndx = ui.rowIndx,grid = this,$cell = grid.getCell(ui);
                 $cell.find("button").button({icons: { primary: 'ui-icon-scissors' }})//
                 .bind("click", function () {
                     grid.addClass({ rowIndx: ui.rowIndx, cls: 'pq-row-delete' });
                     setTimeout(function () {
                         var ans = window.confirm("确定要删除第 " + (rowIndx + 1) + "行吗?");
                         grid.removeClass({ rowIndx: rowIndx, cls: 'pq-row-delete' });
                         if (ans) {grid.deleteRow({ rowIndx: rowIndx });}

Help for ParamQuery Pro / Re: pqSelect performance is very slow.
« on: January 31, 2022, 11:13:34 am »
You'd better put your code to make everyone know what happened. How many columns and records you are using?

Help for ParamQuery Pro / How to shrink size the delete button
« on: January 31, 2022, 11:10:53 am »
I have tried to shrink the size of delete button to reduce the height of every row, but got failed even tried many times.
Is there any solution for it?

In the demo Editors & validations(, for column ShipVia2 there is no limit-in-list for value in select. Would you like to help to show how to make? And use Ctrl+v, user can copy almost any unexpected data to select(s) and save them to database by batch(When user does this, there is only blank in select, in fact the data has be stored in value of select). Is there a solution for it? Here is the code from demo:

              title: "Shipping Via2", dataIndx: "ShipVia2", width: 110,
              cls: 'pq-dropdown pq-side-icon',
              editor: {
                  type: 'select',
                  init: function (ui) {
                      setTimeout(function () {
                  options: [                       
                        { "SE": "Speedy Express" },
                        { "UP": "United Package" },
                        { "FS": "Federal Shipping" }
              //render required to display options text corresponding to value stored in the cell.
              render: function (ui) {                 
                  var option = ui.column.editor.options.find(function (obj) {
                      return (obj[ui.cellData] != null);
                  return option ? option[ui.cellData] : "";

Great help! It works.

I hope to add new row automatically, when the DownArrow Key is pressed in the last row.
Following code works well when there is no filter used. But after filtering, pressing DownArrow Key couldn't add new row automatically when the cell in last row is selected. Would you like to provide help kindly?

              beforeCellKeyDown: function( event, ui ) {
                if(event.key=="Delete" ){
                var nodes = [];
                var type = this.Selection().address()[0].type
                if(type == 'row'){
                   var Sel = this.Selection().eachRow(function(rowData){
                   return false; //to prevent default behaviour.                    
                 if(!this.isValid( { rowData: ui.rowData } ).valid)
                if(event.key=="ArrowDown" && ui.rowIndx==this.getTotalRows()-1){
                        var rowIndx = this.addRow({ rowData: defaultRowData(), checkEditable: true });
                        // this.goToPage({ rowIndx: rowIndx });
                        this.editFirstCellInRow({ rowIndx: rowIndx });   

Pages: 1 2 3 [4] 5 6 ... 9