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
no navigation button in edit dialog
12/08/2008
03:46
Avatar
xavier
Member
Members
Forum Posts: 13
Member Since:
19/06/2008
sp_UserOfflineSmall Offline

I want to get rid of the navigation buttons in the edit dailog. How can i do that?

The reason is that i use an afterShowForm action that i want to do each time i load/open a record into the edit dialog.

13/08/2008
04:53
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

beforeShowForm : function(formid){

// condition here

$("#pData, #nData",formid).hide();

}

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.

08/09/2008
11:10
Avatar
cms
Member
Members
Forum Posts: 8
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

Hello Tony,

i have integrated jqGrid with success, but am having the same problem, but are too new to jquery and jqGrid. Is “beforeShowForm” an Event or a method of jqGrid or of jquery or what else?

Best Regards, Christoph


09/09/2008
02:55
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

beforeShow is event which you can defene it either in

editRow or in navGrid (which call editRow). 

Please refer to docs.

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.

09/09/2008
06:55
Avatar
cms
Member
Members
Forum Posts: 8
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

sorry to bother, but i can’t get it to work. the buttons still appear.

this is my source for the pager where i have defined an additional button that calls the .editGridRow method:

// pager of fifth grid
$(”#EditTableTable”).navGrid(”#EditTablePager”,{
refresh: true, edit: false, add: false, del: false, search: true
}).navButtonAdd(’#EditTablePager’,{
caption:”", buttonimg:”images/edit.gif”, onClickButton: function(){
var rowID = $(”#EditTableTable”).getGridParam(’selrow’);
if( rowID != null ) { $(”#EditTableTable”).editGridRow(rowID,{
top:260,left:20,height:267,width:310,
reloadAfterSubmit:true,
editCaption:”Grant Additional Pincode Registrations”,
closeAfterEdit:true,
beforeShowForm: function(formid){
$(”#pData #nData”, formid).hide();
}
});
}
else alert(”Please select a row…”);
},
position:”last”
});

could you please have a look at it?

Thanks, Christoph

09/09/2008
20:46
Avatar
fxl
Member
Members
Forum Posts: 11
Member Since:
28/08/2008
sp_UserOfflineSmall Offline

SurprisedAppear or not appear ?

I think that your buttonimg path is not right. I sugest you fill the caption parameter to confirm if the problem is that.

10/09/2008
08:56
Avatar
cms
Member
Members
Forum Posts: 8
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

problem: the buttons pData and nData will not hide like i want them to.

10/09/2008
10:12
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

$(”#pData, #nData”, formid).hide();

You missed a comma bettwen the ids

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.

10/09/2008
11:38
Avatar
cms
Member
Members
Forum Posts: 8
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

thanks tony, but that wasn’t it at last.
I have to add the speed with the .hide() method and even leave the formid
like this:

$(”#pData, #nData”).hide(”fast”);

i’m working with jquery 1.2.6, don’t know if that makes the difference…

10/09/2008
13:58
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

So I do not understand - does this work or no.

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.

12/09/2008
02:00
Avatar
zupert
Member
Members
Forum Posts: 18
Member Since:
29/07/2008
sp_UserOfflineSmall Offline

hi,

the only I have found to make it work is following :

jQuery.jgrid.edit = {
        afterShowForm: function (form_id) {
            jQuery("img#pData").css("visibility", "hidden");
            jQuery("img#nData").css("visibility", "hidden");
        }
}

greetings

12/09/2008
03:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

This will hide all your forms when you have more than one grid.

Now I will check this. By the way could you please test with

this

beforeShowForm : function(formid){

$(”#pData",formid).css("display","none");

$(”#nData",formid).css("display","none");

}

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.

12/09/2008
10:04
Avatar
cms
Member
Members
Forum Posts: 8
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

Hello Tony,

your solution
$(”#pData”,formid).css(”display”,”none”);

does not work at all.

Even my solution
$(”#pData, #nData”).hide(”fast”);
does only work every other time. If i call editGridRow(...) a second time, the buttons appear, the next time they don't and so on.

zuperts' solution
jQuery(”img#pData”).css(”visibility”, “hidden”);
does work for my website as i just want to hide all previous and next buttons in the EditForm div.

regards, christoph

12/09/2008
10:39
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Actually this is a bug.

the problem is in this condition:

if(rowid=="_empty") $("#pData, #nData","#"+frmtb).hide(); else $("#pData, #nData","#"+frmtb).show();

Which is called after beforeShowForm and afterShowForm events.

The simple solution is to move this condition before these events, on both places where the form is constructed and after when it is shown.

Thank you all for this.

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.

16/09/2008
02:58
Avatar
cms
Member
Members
Forum Posts: 8
Member Since:
08/09/2008
sp_UserOfflineSmall Offline

Thanks Tony, that works perfectly well.
Best Regards, Christoph

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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