Is there any way to catch update/changes in the Datasheet view of a list in JavaScript in SharePoint 2010? I see their are event receivers but nothing in Javascript.


The datasheet view was renamed to quick edit in SP2013, removing the ActiveX dependencies and migrating the implementation to html / js.

There is almost no documentation about what you are trying to achieve, but I would give a try to spjeff implementation, who overrides the template implementation:


  • Sorry. I forgot to mention I need this for SharePoint 2010. Aug 25 '15 at 12:41
  • 1
    Then I'm sorry too, because in SP 2010 the datasheet view is an ActiveX control, and there is no way you can attach a js event to it: take a look at this
    – Xavi
    Aug 25 '15 at 14:08


in June 2017, Microsoft disabled the use of JavaScript in a Calculated Column

That means given answers may not apply for newer SharePoint versions

For long explanation and work arounds see:
June 13th 2017 Microsoft blocked handling HTML markup in SharePoint calculated fields - how to get the same functionality back

Original answer:


This kinda weird looking code in a Calculated Column set to datatype is Number will attach a KeyUp event to a DOM element above the search box, that way catching each keyup event. If you attach it to each TR (TableRow leave out the 3 parentNodes), it should work in a Datasheet View as well.

    =" <img src=""_layouts/images/blank.gif"" onload=""{"
     & "var TR=this;while(TR.tagName!='TR'){TR=TR.parentNode}"
     & "TR.parentNode.parentNode.parentNode.addEventListener('keyup',"
     & "(function(keyevent){"
     & "this.style.backgroundColor='"
     & [Task Name]  & "'.indexOf(keyevent.srcElement.value)===-1"
     & "?'lightcoral':'lightgreen'"
     & "})"
     & ".bind(TR))"
     & "}"">"


  • Sorry. I forgot to mention I need this for SharePoint 2010. Aug 25 '15 at 12:42
  • SharePoint 2010 accepts this HTML/Javascript in Calculated Columns Aug 27 '15 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.