Forum
Topic RSS
09:05
27/11/2009
Offline12:41
Moderators
30/10/2007
OfflineHello,
There are a lot of solutions, but the problem is where you want to add the parameter - to the grid url or to the editurl options?
In first case you can use setGridParam and use postData array
In second case you can use editData array if you use form editing,
but as I again say - with so little information not possible to help.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
21:54
27/11/2009
OfflineHi Tony, thanks for answer, i explain much better what im trying to do
i have three tables and two grids
table "ficha"
id: auto_incremental
...
table "persona"
id: auto_incremental
name: string
...
table "persona_ficha"
id: auto_incremental
ficha_id: fk with main
persona_id: fk with people
status: char(1)
My first grid is where i CRUD my "persona" table, this grid works all right, when i make double clic in the persona grid i fill the second grid, this is a grid where i put some fields from the persona table, i change the status (a combo select) for that persona record and i need to save the record in the table called "persona_ficha"
Now the problem is work with the second grid, i have this:
onSelectRow: function(id) {
if(id != null) {
jQuery("#grid_persona_ficha").editRow(id);
}
}
this is fine, when i select the row i can edit the grid, but i don't know how to save this, i would like to send the data with an "enter" press event by example, but i can't find this option in the event section in the wiki, the other way im trying to make it work is adding a custom save button in the navigation bar to save all the rows with a for loop
i did this:
.navButtonAdd('#pager_persona_ficha',{
title:"Guardar todos los registros",
caption:"",
buttonicon:"ui-icon-circle-plus",
onClickButton: function(){
var x = jQuery("#grid_persona_ficha").getDataIDs();
for(var i=0; i<x.length;i++)
{
jQuery("#grid_persona_ficha").saveRow(x[i]);
}
},
position:"first"
});
but the problem in two cases is when i send the row data as a post i don't have a parameter like "oper" which i need to send values like "add", "edit" and "del"
10:05
Moderators
30/10/2007
OfflineHello,
Maybe you do not read the right section in the docs.
If you pass a second parameter to editRow - e.g true you can save tha data with enter key
See here:
http://www.trirand.com/jqgridw.....ng#editrow
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
00:31
27/11/2009
Offline17:51
Moderators
30/10/2007
OfflineHello,
In the same link you will see extraparam option use it to pass additional parameters.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 994
Currently Online:
34 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66
Log In
Home