Hello,
I’m not sure what you mean. Can you please explain?
Where is this code put what you try to do.
If you give more info it will be better.
Best Regards,
Tony
Hello,
Which version of jqGrid is used?
The runCode function which “avoid” eval is needed for the local engine – i.e to work with datatype local. This is out of the box and currently we can not change that code.
In case you do not use datatype local you can simply remove that function or simple do
1 2 3 |
runCode: function (obj) { return JSON.parse(obj); } |
Best Regards,
Tony
Hello,
This change was available in version 5.2.1.
See the Readme here
Before this change the default values was available only in formatter (if I remember right)
To overcome this you can not set the default values array. Set it to null or empty array();
Or if you really do not need to remove this use setColProperty again to set the values in the editoptions after the setSelect
1 2 3 |
$grid->setColProperty('somecolumn', array("label"=>"Some column", "width"=>"60", "align"=>"center", "edittype"=>"select", "editoptions"=>array("value"=>" :Select"), "searchoptions"=>array("clearSearch"=>false), "formoptions"=>array("label"=>"Some column"))); $grid->setSelect("somecolumn", array(""=>"", "yes"=>"yes"), true, true, true, array(""=>"Any")); $grid->setColProperty('somecolumn', array( "editoptions"=>array("value"=>" :Select;yes:yes"))); |
This will overwrite the current settings.
Best Regards,
Tony
Hello Kris,
I can see two possible solutions for mow. Both of these are not tested.
Use the between operator in toolbar searching. The code for this is bt (set is as default if you want only this possibility). This will be possible only if your date-range picker widget support custom separator between the dates. In jqGrid the separator is … and can’t be configured – it is hard coded for now. Demo with description is here
The second option is to use a custom search field where you should add your own code to separate the dates and build the search string, but I think that this is a little complex.
Please let me know if you have a problem with the first option – we can make this better.
Best Regards,
Hello
Your example works well and I think that you use addRowData to add a node instead of addChildNode method. See the docs here
The demo of your code is located here
To add a node – select the first row and add the needed data. You will see that the record is added in the appropriate place
Best Regards
Hello,
Thank you for the recommendation. We will try to fix this.
Incorporating date Picker in jqGrid is done via setDatepicker method which is described into the docs. Below is the description:
Construct a pop up calender used in the grid. The datepicker can be used in the editing modules or/and in search module.
Parameters:
Example of using this command is in our demo site where a date picker is used. We have changed allmost all example containing data picker.
In common rules the date picker should be used the same way as the jQuery UI autocomplete. If you are in this case , please let me know, I will prepare personally some example without grid, so that it is know how to use it.
Best Regards,
Tony
Hello,
Thank you very much for finding this problem. We have fixed it.
Please let us know if there is problem with this or any other.
Best Regards,
Tony
Hello,
What you mean global setting – what you do is a global setting.
As far as I remember the big height of the table row of Bottstrap 4 is caused by the padding (defined in class table) which (I remember) is about 0.75rem. You can make the height of the row smaller if you reduce the top and bottom padding.
By example to do this only for all jqGrid you can:
1 2 3 4 |
.ui-jqgrid-bdiv .table td { padding-top : 0.45rem; padding-bottom : 0.45rem; } |
Hello Kris,
Thank you for posting your solution and let us know where the problem was.
Kind Regards,
Tony
Hello Pawel,
We found your problem interesting and practical, so I have prepared a article in our Knowledge base. You can take a look at it here.
The demo is here
Please let us know if something is not clear.
Kind Regards,
Tony
Hello,
Currently there is no build in such method, but there is a method where
you can obtain the WHERE clause when a search is in action.
This is done with the method builSearch
This can be something like this:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
... // Check to see if we are in search mode $search = jqGridUtils::GetParam("_search"); // if($search == 'true') { // if we aare in search get the where clause $where = $grid->buildSearch( '' ); // do what you want } else { ... } |
So after you are in search mode and the user activate the search the $where look like:
“(OrderID = ‘10248’ AND ShipName = ‘Vins’ )”
Youi can pass your own filters to it. A second parameter determines return mode
Regards
Yes. This is correct.
Kind Regards,
Hello Thomas,
We have do the first step for resolving the problem
To make this happen set in grid options
useNameForSearch : true
The option work only when the data is local. We plan to make this option true by default and do some more fixes in all search modules.
You can get the fix from here
Please let us know if the problem is fixed for you.
Kind Regards,
Hello Murray,
I just checked – in the current implementation in the jqGrid of the methods provided from jQuery UI it is not possible to have at the same time drag and drop and sortable in the same grid.
Reason for this is that for drag and drop we use drag-able and droppable, while for sortable we use sortable
To have booth we need to have to use only sortable like in the example
More on this problem can be found here
Kind Regards,
Hello Thomas,
Unfortunately we do not have fixed this issue. The problem is that when we fix this the sorting will be destroyed.
Currently we search solution which will meet these two requirements.
Thank you for your patience. Personally I will let you know when we fix the problem.
Kind Regards,
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top