Hello,
I recommend you to read the http://www.guriddo.net/documentation/guriddo/javascript/user-guide/pivotgrid/”>docs here
$pivot->dataType=”json”;
set the initial format to json when the grid get the data. After that the data is local and you will need to set this in the javascript when the row is selected.
When you sort or paging the master you actually need to unload the pivot grid and create it again when you select the row on master.
The same should apply if select new row on master – i.e unload the existing pivot ($.jgrid.gridUnload(grid_id) ) and create new one. This is a little bit difficult and not the same as the regular example of master detail.
The main that should be considered is that after selecting every new row or sort and paging the data at master the pivot should be destroyed
In order this to work you will need load the new pivot via ajax in order to get the correct data. Example how to load a grid via ajax is here.
Not sure, but if you can omit the pivot in this situation it will make you life easier.
Regards
Will
Guriddo Support Team
Hello,
PivotGrid columns are builded dynamically depending on the source data. After the data is processed new columns are build-ed and new data is created. All this is done automatically.
After the pivot is created you can’t add columns (in the grid you allways can’t add column dynamically).
As far as I understand you want to add a actions column (like edit add delete) after the pivot is created?
Usually the pivot is used as report result and not as editing data. Editing a pivot is a little bit difficult, but not impossible
I suggest you if you want to edit the certain data to overcome using a pivot in this case.
Kind Regards
Will
Guriddo Support Team
Hello,
I’m really confused, but I can’t understand the problem.
To summarize: You have a master detail solution like this here where your detail is a pivot grid. Is this the case?
Guriddo Support Team
Hello,
Thank you for the feedback. Glad to help.
Kind Regards,
Will
Guriddo Support Team
Hello,
For us is a little bit difficult to undersatnd what you try to do.
You may need to look here
Personally I think in order to resolve your issue you will need to define a custom button instead of delete one.
The definition of custom button with getting the selected data can be seen like
this:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
... jQuery("#grid_id").jqGrid('navGrid',"#pager",.../*navigation parameter*/); jQuery("#grid_id").jqGrid('navButtonAdd',"#pager", { caption:"My Delete Actiion", buttonicon:"ui-icon-newwin", position: "last", cursor: "pointer" onClickButton: function() { var seldata=[]; // array to push the var selectedids = $("#grid").jqGrid('getGridParam', 'selarrrow'); if(selectedids.length) { for(var j=0;i<selectedids.length;j++) { seldata.push( $("#grid").jqGrid('getRowData', selectedids[j]) ); } } // you can serialize the array seldata with JSON.serialize and send the data to your ajax $.ajax({ url : 'yoururl', data : {your serialized data} ... }); } }); |
Hope this helps.
Kind Regards,
Will
Guriddo Support Team
Hello,
Unfortunately we can’t reproduce the problem. The vertical scroll is always active instead of number of the records.
Here is example (with latest 5.3.1 and Boootstrap 3.3.7)
In order to see the problem, please prepare a working example with data and send it to us or send us a link to the demo.
Kind Regards,
Will
Guriddo Support Team
Hello,
First of all I prefer you to consult our new created documentation
Here you will find almost the answer of your questions.
I will begin from the second question.
To get the id’s of all selected rows (in case of multiselect) use the method getGridParam with parameter selarrrow. and to get the data of all selected rows use getRowData method. All of this is in the docs
|
1 2 3 4 5 6 7 |
var seldata=[]; // array to push the var selectedids = $("#grid").jqGrid('getGridParam', 'selarrrow'); if(selectedids.length) { for(var i=0;i<selectedids.length;i++) { seldata.push( $("#grid").jqGrid('getRowData', selectedids<em class="d4pbbc-italic"></em>) ); } } |
For the first question you can have two possibilitie:
– use serializeDelData paramater when deleting a row
http://www.guriddo.net/documentation/guriddo/javascript/user-guide/navigating/#parameters
and here
http://www.guriddo.net/documentation/guriddo/javascript/user-guide/editing/#del-grid-row
or define your own button in navigator using navButtonAdd method.
Look here”: http://www.guriddo.net/documentation/guriddo/javascript/user-guide/navigating/#custom-buttons
The second way is preferred one since you have full control of what yo want to send.
Kind Regards,
Will
Guriddo Support Team
Hello,
Try the following
|
1 2 3 4 5 6 7 |
<style type="text/css"> .myclass td{ background-color: red; } </style> <?php include ("grid.php");?> |
Please note how the style is applied and that the style tag is included not in the head section, but before the calling of the grid code.
The above code work in our tests.
Kind Regards,
Will
Guriddo Support Team
Hello,
First of all thank you for posting a solution.
The clarification of the solution is that after the pivot grid is created and data is loaded the datatype is set internally to local – i.e if you need to load new data from server you will need to set it again to json.
It is a good idea before to load the new data to clear the pivot (grid data)
Kind Regards,
Will
Guriddo Support Team
Hello,
Could you please try with the latest version of Guriddo 5.3.1. There was a small problems regarding this issue.
When try do not forget to replace the css file too and clear the browser cashes.
Kind Regards,
Will
Guriddo Support Team
Hello,
Which CSS Framework is used – jQuery UI or Bootstrap?
Kind Regards,
Will
Guriddo Support Team
Hello,
Unfortunately to do this you will need to know a little JavaSript.
We recommend in this case using the rowattr event. This can be achieved with the setGridEvent event. By example you can do something like this
|
1 2 3 4 5 6 7 8 9 10 11 |
// define condition $mycolor = <<< ROWATTR function (rowData, rowObject) { if(rowData.somefield == somevalue) { return { "class" : "myrowcolorclass"}; } } ROWATTR; // set the grid event via PHP $grid->setGridEvent('rowattr', $mycolor); |
Please let us know if something in not clear with this code
Kind Regards,
Will
Guriddo Support Team
Hello,
To use the toolbar search without searching maybe you can use beforeSaech event in the toolbar searching
Use this event and return true in order to disable serching, but define your own actions.
This is just idea.
Kind Regards,
Will
Guriddo Support Team
Hello,
Editing of the post is set with the default setup of the forum: 5 minutes after creation.
With jqGrid setup I mean a working example with data which shows the problem.
Can you please prepare a working example with simple data to demonstrate the problem with local search?
Kind Regards,
Will
Guriddo Support Team
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top