Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Master Detail Grid : Passing Parameters from Master to Detail
24/06/2008
18:34
Avatar
interlee
Member
Members
Forum Posts: 20
Member Since:
13/06/2008
sp_UserOfflineSmall Offline

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

25/06/2008
01:28
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

25/06/2008
11:07
Avatar
interlee
Member
Members
Forum Posts: 20
Member Since:
13/06/2008
sp_UserOfflineSmall Offline

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.

26/06/2008
06:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

26/06/2008
09:02
Avatar
interlee
Member
Members
Forum Posts: 20
Member Since:
13/06/2008
sp_UserOfflineSmall Offline

Hi Tony,

When I copied everything except the file “grid.base.js”, the grids are working properly. It looks that the file 'grid.base.js' may be the one that caused the behavior.

Best,

Daniel

27/06/2008
02:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

05/07/2008
11:56
Avatar
interlee
Member
Members
Forum Posts: 20
Member Since:
13/06/2008
sp_UserOfflineSmall Offline

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

07/07/2008
00:28
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

07/07/2008
12:33
Avatar
interlee
Member
Members
Forum Posts: 20
Member Since:
13/06/2008
sp_UserOfflineSmall Offline

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");
}

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
23 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information