Need to override the keyup function with a home grown function

I have a jqGrid validation methodology that's killing performance, due to the fact that the validateDuplicates function is being injected into the keyup event. I want to use my own function which would only return true if a duplicate is found, and at that point a performance hickup is okay.

Can someone tel me how to make up my own function, and make it chainable?

Right now I have this:

I need (at least I think I need) to write an alternative to keyup, call it displiatesFound. And in there I'd add each barcode to a list, after checking if it already existed. If it did exist, two duplicates are found.

newbiewebSr. Software EngineerAsked:
Who is Participating?
Gurvinder Pal SinghConnect With a Mentor Commented:
Gurvinder Pal SinghCommented:
why don't you simply unbind the keyup event and see what happens?
newbiewebSr. Software EngineerAuthor Commented:
Not sure what you mean by unbinding...
newbiewebSr. Software EngineerAuthor Commented:
But then what action (or event) would call the jquery default error code?

Here's what I was going to do. Please tell me if this will work. Oddly, it seems to and I have not yet even created my own duplicates test. I planned to insert it inside the anonymous function I created.

$('[id^="Container_"]).keyup(function () {

What do you think?
newbiewebSr. Software EngineerAuthor Commented:
I think my code unbinded it in a different way. Thanks.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.