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
get additional data on custom validation
24/12/2010
09:27
Avatar
pninaho
New Member
Members
Forum Posts: 2
Member Since:
24/12/2010
sp_UserOfflineSmall Offline

I have 2 fields departDate and arriveDate and in the save of edit/add I need to check the arriveDate is greater then the departDate

I create custom function for the arriveDate field but I didnt know how to get the value of the departDate.

I put the edit button in the gridComplete function:

for(var i=0;i < ids.length;i++){
  var cl = ids[i];
  be = "<input style='height:22px;width:20px;' type='button' value='E' onclick="jQuery('#"+subgrid_table_id+"').jqGrid('editRow',"+cl+",true,pickdates);" />";
  se = "<input style='height:22px;width:20px;' type='button' value='S' onclick="jQuery('#"+subgrid_table_id+"').saveRow('"+cl+"');" />";
  ce = "<input style='height:22px;width:20px;' type='button' value='C' onclick="jQuery('#"+subgrid_table_id+"').restoreRow('"+cl+"');" />";

jQuery("#"+subgrid_table_id).jqGrid('setRowData',ids[i],{act:ce+se+be});

}

so the user doesn't need to select the row before he press on the edit so I cant get the select row id and try to take the value from there.

Any solution?

thanks!

26/12/2010
14:12
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I do recommend you to check the dates server side and use the success function to notify the user if the dates are ok.

http://www.trirand.com/jqgridw.....ne_editing

Note that in your case you should use this evenent in both saveRow and editRow

Kind 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:
49 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