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

Pages: [1]
1
Help for ParamQuery Grid (free version) / Refreshing the grid
« on: August 30, 2018, 05:25:16 pm »
After the form submit, the page is loaded and the grid is shown as in the attached image.
I tried to refresh() refreshDatAndView() and other refresh function, but the form is not shown until I click the refresh button manually.


2
Solution:


  {
                                    title: "Policy", width: 95, dataIndx: "Name",
                                    editor: {

                                        type: function (ui) {

                                            ui.$cell.append(ui.rowData["Name"] + "<button class='pqGrid-dots-button' onclick='showPolicies(this)'>...</button>");
                                        }
                                    }
                                }

3
Help for ParamQuery Grid (free version) / Re: Fill grid from json
« on: August 24, 2018, 01:12:40 pm »
Thank you,

I have checked the example and understood it, however I have the following problems:
- the grid is not rendered (the columns and rows are not shown)until I call the refresh() inside the debugger, or I click the scroll of the grid, if I  called it  inside the code, it is not rendering!

- I have many columns in both parent and children row, where the grid has a 'New' button in the toolbar to add a new parent or child row (taken from your examples)  , should I use the same workflow to load the JSON with the mentioned grid structure?

4
Help for ParamQuery Grid (free version) / Fill grid from json
« on: August 23, 2018, 03:57:17 pm »
I have two JSON strings, one contains the data that should be the parent rows and the second that should be the children rows.
Each object in the second string has a property called parentID that has a value that exists in the parent string (so I know each child row to which parent row should be linked)
How can i fill the grid with these two objects, so I have a children rows for each parent row?

5
The solution is : (Taken from a post in the forum):

/*
Reference to a detail grid is stored in the corresponding rowData i.e., rowData.pq_detail.child holds a reference to the DOM of the child grid.
So to get all the child grids, you need to loop through all rowData of parent grid.
*/
var grid = $gridMain.data('pqGrid'), //instance of master grid.
                  data = grid.option('dataModel.data'); //data of master grid.
               for(var i=0;i<data.length;i++){
                  var rd = data,
                     dt = rd.pq_detail,
                     child;
                  if(dt && dt.child){
                     //dt.child is reference to the DOM node of the child grid.
                     child = $(dt.child).data('pqGrid');//reference to instance of child grid.
                     var dataChild = child.option('dataModel.data');//data of child grid.
                  }
               }

6
Hello,
I have a nested grid, i need to get the rows in the grid and send to the server. I tried getData() and pData property. but these methods returns the data and some additional info, so when I stringify() there is data that I don't need. in addition to that I am unable to get the children data .

Thanks

7
I need to create a custom editor in the PQGrid, that contains a text-box and to the right of it a button.

Thanks,

8
Help for ParamQuery Grid (free version) / extend the param query grid
« on: August 15, 2018, 04:56:40 pm »
What is the best way to extend the PQGrid by adding custom properties/methods to it? I will appreciate it if you provide examples.

Thanks

9
Hello,

If I have the rowIndx of a row inside a detail grid, how can I get its parent row in the main grid?

See the image please:
the row with the data {1,test} has the parent row with ID CLN00742. How I can get this row?

10
Help for ParamQuery Grid (free version) / Re: Add new row to nested grid
« on: August 14, 2018, 01:29:28 pm »
This is the solution:

    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 });
                                              }
                                          }
                                    }

                                ]

11
Help for ParamQuery Grid (free version) / Re: Add new row to nested grid
« on: August 14, 2018, 12:14:59 pm »
Thank you for your reply, I need to append a new row upon clicking the "New" button in the toolbar.Please check the attached image.

12
Help for ParamQuery Grid (free version) / Add new row to nested grid
« on: August 14, 2018, 11:26:54 am »
Hello,
How can I add a new empty row, to the nested grid, where the new row is added to the child grid of the current selected row.
Thanks,

Pages: [1]