Forum


Hi Tony,
I have implemented a Master - Detail Grid. This is such a fantastic tool and I can not thank enough for your time and effort.
I have one question. (Please see the screen shot for your reference: http://mc-dev-01.tech.northwes.....detail.gif)
When I click one row in the Master Grid, the detail information is displayed in the detail grid. And when I click the button “Add New” at the bottom of the detail grid and submit it, I'd like to pass some values of the selected row in the Master Grid (not the Detail Grid) to the server request, which is a backend PHP script.
For example, in the screen shot, I'd like to pass the first three columns (Fund, area, and Org) to the server request when I click the button “Submit” in the modal dialog box.
Would you please tell me how I can do that?
Best,
Daniel
01:28

Moderators
30/10/2007

Daniel,
First you should use a 3.2rc
Here is a little fragment. I suppose you attach a click to new or edit buttons.
$("#editbutton").click(function() {
var master_id = $("master").getGridParam('selrow');
if(master_id) {
var masterdata = $("master").getRowData(master_id);
if (masterdata){
// here data from master
$("#detail").setGridParam({editurl:...})
}
}
});
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.
Hi Tony,
Thanks for the quick response.
As you suggested, I've downloaded the 3.2rc and overwrote the *.js files in the js folder with the 3.2rc ones. (I had been using jqgrid 3.1). Also, I added the new css element “div.loadingui” into the grid.css file. Unfortunately, however, the master grid does not display anything after this upgrade. (Please see the screen shot for your information: http://mc-dev-01.tech.northwes.....l_32rc.gif)This goes the same with other single grids as well.
Am I missing something in upgrading to 3.2rc?
Best regards!
Daniel Lee
P.S: I reverted the changes, copying those 3.1's *.js files back to the js folder, and the grids are working again.
06:05

Moderators
30/10/2007

Daniel.
"Am I missing something in upgrading to 3.2rc" - this is very strange.
Could you please replace only the grid.formedit and see what is going on
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.
02:29

Moderators
30/10/2007

Thanks I will check the zip.
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.
Hi Tony,
Regarding the issue above, the line number 355 in the file "grid.base.js" tries to insert something right before the tag <div class="loadingui"...>.
However, I could not find any file that defines the <div class="loadingui"...>. So, I wonder if this would be the cause of the problem I am experiencing.
Best regards,
Daniel
00:28

Moderators
30/10/2007

If you have download the 3.2rc there is a readme.txt on how to upgrade.
You need to add come code in the used css.
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.
My baaaad.
I realized that I was using unnecessary header information in my server script below. I commented out those and it worked perfect!
Thanks Tony!
if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
header("Content-type: application/xhtml+xml;charset=utf-8");
} else {
header("Content-type: text/xml;charset=utf-8");
}
Most Users Ever Online: 715
Currently Online:
56 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