Spread for ASP.NET 7.0 Product Documentation
Using a Client Scripting Method
See Also Support Options
Spread for ASP.NET 7.0 Product Documentation > Client-Side Scripting Reference > Scripting Overview > Using a Client Scripting Method

Glossary Item Box

Many built-in capabilities are provided in the Spread HTML component (HTC) file, fpspread.htc. The fpspread.htc file implements the client-side functions for the Spread component. It provides a number of properties, methods, and events that can be used in your client-side scripting code in HTML. For a complete list of the contents, refer to the Scripting Members.

Besides using the scripting members, you can also create your own HTC file to implement client-side scripting. Refer to Developing a Custom HTC File.

The following sample code for the ASPX page uses the built-in GetValue method to total the values in the cells (all except the last cell) of the first column and uses the SetValue method to put the result in the last cell of that column.

JavaScript Copy Code
<SCRIPT language=javascript>
  function doCalc() {
    var rc = FpSpread1.GetRowCount();
    var total = 0;
    for (var i=0; i<rc-1, i++) {
      var value = parseFloat(FpSpread1.GetValue( i, 0 ));
      total += value;
    }
    if (!isNaN(total))
      FpSpread1.SetValue(n-1, 0, total, true);
  }
</SCRIPT>

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.