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_Related Related Topics sp_TopicIcon
Function to return true or false to ADD/EDIT buttons in navGrid
28/07/2010
18:53
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Hello tony and everyone...

I'd need just a little help since I haven't found any info in documentation: while creating or reloading jqGrid, I'd like to check if I have some necessary data in other tables which will fill selects in editing form so I can enable/unable add/edit button... if it's possible, how I can do that?...

That because in a certain jqGrid where I have two selects in form editing, it's necessary to have data to be filled in selects to open form editing otherwise user can't open form editing...

Thanks a lot

Ciao,

Luigi

29/07/2010
09:25
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

I tried even doing this:

.navGrid('#pager',

     {add:function(){return false}, edit: true…. }

but the add button won't be false, it remains true… and I thought I could do some ajax call to execute a PHP script in the place of that 'return false' to check if there are some data…

if it's possible to use a function, anyone could tell me how I can pass a function to add: so it would return true or false?... I mean at least the syntax of the function... I tried also with:

{add:$(document).ready(function(){}, .....}

but even the grid won't be created...

any directions would be appreciated.

Thanks

Ciao, Luigi

30/07/2010
01:13
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Changed solution:

used:

{ addfunc: function() { blah blah blah... if (true) jQuery('#grid_id').editGridRow("new", {options});}

Thanks anyway

Ciao

Luigi

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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