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
Hidden modal window
21/06/2008
18:33
Avatar
phipps73
Member
Members
Forum Posts: 17
Member Since:
12/06/2008
sp_UserOfflineSmall Offline

Hi,

I am trying to add a new row to a grid when a button is clicked. When

the button is click the following function is called:

$("#assignPos").click(function() {

$("#list").editGridRow("new",{height:280,reloadAfterSubmit:false});

});

When the button is clicked the overlay appears but the actual modal window remains hidden. I have inspected the page with Firebug and the display style (for modal) is set to block which means it should be showing.

I have modal windows working on another page in the site but I am calling this one in a different way and I can't figure out where I am going wrong!

My grid call is as follows:

$("#list").jqGrid({
                       url:'assets/includes/listPositions.cfm?PersonID=0',
                       datatype: 'json',
                       colNames:['ID','Position Code','Position Type','Parish Name','Start Date','Finish Date','CommitteeMemberTypeID','ClergyStatusID'],
                       colModel:[
                       {name:'tjppid',key: true,index:'tjppid',editable:true,editoptions:{readonly:true},width: 40},
                       {name:'PositionID',index:'PositionID',width:150},
                       {name:'PositionType',index:'PositionType',width: 250},
                       {name:'ParishName',index:'ParishName',width: 260},
                       {name:'StartDate',index:'StartDate',sorttype:"date",editable:true, editoptions:{size:10,maxlength:10},width:100},
                       {name:'FinishDate',index:'FinishDate',sorttype:"date", editable:true, editoptions:{size:10,maxlength:10},width:100},
                       {name:'CommitteeMemberTypeID',index:'CommitteeMemberTypeID', width:0,editable:true,edittype:'select',editoptions:{value:"<cfloop query="qCMType"><cfoutput>#MemberTypeID#:#MemberType#<cfif recordcount gt currentrow>;</cfif></cfoutput></cfloop>"}},
                       {name:'ClergyStatusID',index:'ClergyStatusID',width: 0,editable:true,edittype:'select',editoptions:{value:"<cfloop query="qClergyStatus"><cfoutput>#StatusID#:#Status#<cfif recordcount gt currentrow>;</cfif></cfoutput></cfloop>"}}],
                       sortname: 'PositionType',
                       sortorder: "asc",
                       viewrecords: true,
                       imgpath: 'assets/js/jqGrid/themes/sand/images',
                       jsonReader: {repeatitems: false},
                       height:120,
                       onSelectRow: function(id){
                            if(id && id!==lastsel2){
                                $('#list').restoreRow(lastsel2);
                                $('#list').editRow(id,true,pickdates);
                                lastsel2=id;
                                }
                       },
                       editurl: "assets/includes/assignPosition.cfm"

});

Any suggestions? Maybe there is an easier way to have a button that when clicked opens the modal form for adding a new row. The grid may have 0 or more rows already.

Cheers,

Dave

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

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

This happen in IE6/7 and with jQuery 1.2.6 ? - Right?

If this is the case there is a little bug in jqModal. Please switch to jQuery 1.2.3

untill the bug is corrected. I have implemented my solution for this but I'm not sure if this is the right way.

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.

22/06/2008
07:25
Avatar
phipps73
Member
Members
Forum Posts: 17
Member Since:
12/06/2008
sp_UserOfflineSmall Offline

Hi Tony,

Sorry I am on a Mac using Firefox 3 running jquery 1.2.3 (I haven't upgraded to 1.2.6 yet). Could the IE6/7 bug be appearing in FF3 as well?

Cheers,

Dave

22/06/2008
07:50
Avatar
phipps73
Member
Members
Forum Posts: 17
Member Since:
12/06/2008
sp_UserOfflineSmall Offline

Hi Tony,

Ignore that last post I checked the page on FF2 and it worked - I then checked it again on FF3 and it is now working - no code changed!! So
probably a problem with FF3 rather than the grid. After restarting FF3 the modal appears.

I have also discovered a sneaky way to hide a column whilst still allowing
it to be editable! Set the width to 0 in the ColModel[]!.

Cheers for a great plugin!

Dave

22/06/2008
09:20
Avatar
phipps73
Member
Members
Forum Posts: 17
Member Since:
12/06/2008
sp_UserOfflineSmall Offline

I must be going mad! Setting the width to 0 has no effect. The columns
are still showing in the grid. Is there a way to hide them in the grid but
allow them to be shown in the modal form? If I mark them as hidden
then they disappear from the form as well.

Cheers,

Dave

23/06/2008
10:14
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

In the final release there will be a option to edit hidden fields in form editing

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.

24/06/2008
03:48
Avatar
phipps73
Member
Members
Forum Posts: 17
Member Since:
12/06/2008
sp_UserOfflineSmall Offline

Hi Tony,

I modified the code in grid.formedit.js. In the createData function I
changed this line:

dc = hc ? "style='display:none'" : "";
to this:
dc = hc ? "" : "";

This fixed my problem. I am able to hide columns in the grid but still
show them as editable and appear in the modal form.

Cheers,

Dave

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

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

Dave,

This is a partial solution, since if you dont want some hidden fields to be in form the would be.

I hope to publish the final 3.2 soon

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
45 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