I think yes.
The name of function is wrong. It should be handle_register.
Second this function must return at least array with one value
Regards
Tony
Ok,
There seems that this should be explained.
First lets think what we should do to obtain the select values from db with the grid request (url option).
– We need to make additional query for this. The query should return a value name from table.
– These values can be merged in userdata option.
– Let suppose that after the additional query the result can be mergead into the string of type s = val1:name1;val2:name2….
then before to send the request back to jqGrid we can constuct a userdata this way (xml example)
echo s;
Then we can use loadComplete
loadComplete: function () {
var udata = $(“#mygrid”).getUserData();
$(“#mygrid”).setColProp(‘myselect_box’,editoptions:{value:udata.mylist});
}
Hope this help
Regards
Tony
Currently no example, but if you see haw userdata can be manipulated you can easy construct this.
Regards
Tony
Thank you for this information
Regards
Tony
Ioannis,
IMHO I think that you mix updating with selecting.
To update values in the db you must first obtain the posted values, analyze them and after that update the DB table(s).
If you have set a editurl then, you must first use something like
$name = $_POST;
...
then
SQL = "UPDATE mytable SET name=".$name ...
Regards
Tony
Hi,
It seems that on hidden fields fck does not work.
You can do this without to change the formedit code. Simply use a one trick with afterShowForm event.
Let suppose you defined textarea field in colModel.
In edit options add this for these fielfds editoptions:{class:’fck’…}
Since afterShowForm is called every time you click on edit or create button you should call it only once. For this purpose define global variable something like
var aftershowcnt = false
then
afterShowForm : function(form_id) {
if (!aftershowcnt ) {
$(‘.fck’,form_id).fck( options )
aftershowcnt = true;
}
}
Regards
Tony
Not this, but this
var minver = true;
Set it to false to use the new version
Regards
Tony
You should add fckeditor in filData function too.
something like:
….
case “text”:
case “textarea”:
case “fckeditor”:
$(“#”+nm,”#”+frmtb).val(tmp);
break;
….
This is the right way to do that, bu I think that the right code should be:
function createEl(eltype,options,vl) {
var elem = â€â€;
switch (eltype)
{
case â€fckeditor†:
elem = document.createElement(â€textareaâ€);
$(elem).attr(options);
$(elem).html(vl);
//fckeditor call using jquer.FCKEditor.js
$(elem).fck({ path: “/fckeditor/”,toolbar: ’Basic’, height: 100, width:300});
break;
If you have FireBug see what is happen
Regards
P.S. If I have time I will test this
I plan to implement some features such as required, number, minValue maxValue and etc.
Little difficult. Actually we do not submit form directly – i.e. using the url in the action. Data is send via ajax post method.
Open jquery.jqGrid.js and see which .js files are you use. Maybe you use minified files. Change the paths to right files.
Regards
Tony
Search this topic on how to insert HTML content
Regards
You mean freeze columns.
Not in current plan, but will add this in the list
Regards
Tony
Please upgrage to 3.2. This bug is corrected. Actually this is only in IE.
Regards
Tony
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top