• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 705
  • Last Modified:

Need functions that extend the default validation checking for jqGrid

I have a jqGrid which is returning the same message twice, since I am using the built in validation to validate two related fields. They need to have the same message, so I need a way to only display the message once.

The error message box is created by Ajax/jqGrid and I do not know how to drill down and find that message.

Can someone please tell me how to define a custom validation function that extend the default validation checking?  The line where the error message is defined here:

+ "data-val-remote-url='/Ajax/IsConcEnough' data-val-remote-additionalfields='SubmissionID,samples[{0}].Vol' data-val-remote='Provided Volume and Concentration are not enough' data-val-remote-type='POST' "


I would like to call a function instead os using a string to set the data-val-remote parameter. And I would like to return a null string in the event the other control also has a value set for the  data-val-remote parameter.

Thanks.
0
newbieweb
Asked:
newbieweb
  • 2
  • 2
1 Solution
 
leakim971PluritechnicianCommented:
could you provide a link to your page?
0
 
newbiewebAuthor Commented:
My site is internal use, and this change is not yet deployed. Funny, that was my question in an earlier day of me working with jqGrid validation.

Today I tested using C# code in the creationof the Ajax return error string values at page load. And that works!

BUT, seems rather like an oversight, but while I am able to set a max and a min value of the field, I seem only allowed one range message. First one defined, rules.

Odd.

data-val-range seems to hold the message. Any idea how to get BOTH a min and a max message?
0
 
newbiewebAuthor Commented:
Hi, that link helped a bit.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now