Ok,
When the values are static here is a fragment on how to do that:
afterInsertRow : function(rowid,recdata){
var idtotext;
colid = 2; //the id of the column which holds the select begin from 0
switch (recdata.selectid){
case 'AB':
idtotext = 'ABTEXT';
break;
….
}
$(”#mygrid”).SetCell(rowid,colid,idtotext);
// when we use colid instead of colname this method is faster
}
Regards
Tony
…jqGrid({
….
pgbutons : false,
pginput: false,
viewrecords: false,
rowList: [],
…
}
The viewrecords and rowList by default are false and []
This is true if you use 3.2.1 version
Regards
Tony
This is true only if the values in editoptions are static. In case of dynamic values in options this will not work since the engine will read the data, but the text are not redy yet.
Instead I will try to investigate this
Thank you
Regards
Tony
Hi Jon,
I think that I do not undertstand something. So let me explain what I know.
To the grid you send the text of the combo – right?
You use formedit to change the values of that field.
But before doing this jqGrid should know what for values and text are
for this combo – right? This is done via editoptions:{value:”key1:value1;…
In other words you should construct editoptions value. This can be
done statically and dynamically depending on your needs – or simply
we should have the key before they is sended to the server.
My question is where are the keys for these combos?
Best
Tony
I think that this is possible. I will see what can I do.
Regards
Tony
How do you send the request?
If this is additional request you can use aftersavefunc to which is passed
the rowid. Then you can use getRowData method to obtain the needed
values and send them to your request.
Regards
Tony
In you case just after reloadAfterSubmit:true
You vcan use beforeShowForm event in booth add and edit something like
//for add
beforeShowForm: function(form_id){
$(“#mygrid”).setGridParam({editurl:”add.jsp”})
}
//for edit
beforeShowForm: function(form_id){
$(“#mygrid”).setGridParam({editurl:”edit.jsp”})
}
Also check if you have loaded all the needed modules and Styles – refer to documentation. Check if the paths are correct. This is common problem when trying to use navigator
Regards
Tony
Thanks David,
Fixed.
Regards
Tony
To refresh the grid every 5 seconds
I think yes, but never try it. There is post here where some user implement the fileupload plugin.
Maybe when you create the first subgrid, then
$(”#”+subgrid_id).appent(“second_table”)
$(“#secondtable_id”).jqGrid({…});
As I see you use the old version of jqGrid.
Maybe here is the solution (using the last one)
$(”#realTable”).setGridParam({datatype:'xml',url:”someurl”}).
trigger(“reloadGrid”);
$(“#realTable”).setGridParam({datatype:”local”});
Regards
Tony
It is very strange. Now I have IE7 and I do not have such problems. Could you please be more detail?
Thank you
Regards
Tony
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top