Spread for ASP.NET 7.0 Product Documentation
Doing a Quick Validation Before Postback
Support Options
Spread for ASP.NET 7.0 Product Documentation > Client-Side Scripting Reference > Scripting Overview > Some Simple Uses of Client Scripting > Doing a Quick Validation Before Postback

Glossary Item Box

You can use client-side scripting in Spread to get the Update button and map your own click event for it. This allows you to perform client-side validations before the data gets posted to the server. If it succeeds, then the Update postback occurs. The following code sets up this validation.

JavaScript Copy Code
<script language="javascript">
  function window.onload()
  {
    var updbtn = FpSpread1.all("FpSpread1_Update");
    updbtn.onclick = test;
  }

  function test()
  {
    if(succeeds)
      doPostBack(FpSpread1.id, "Update");
  }
</script>
© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.