Spread for ASP.NET 7.0 Product Documentation
Retrieving the Text in Headers
Support Options
Spread for ASP.NET 7.0 Product Documentation > Client-Side Scripting Reference > Scripting Overview > Some Simple Uses of Client Scripting > Retrieving the Text in Headers

Glossary Item Box

You can use client-side scripting in Spread to retrieve the text from the headers using code similar to this example. The following code gets the text on the client side.

JavaScript Copy Code
<script language="javascript">
  function retheadtext() {
    var span = FpSpread1.all("FpSpread1_colHeader");
    var table = span.firstChild;
    var tr = table.rows(0);
    alert("Text in column header 3 is " + tr.cells(2).innerText);
    span = FpSpread1.all("FpSpread1_rowHeader");
    table = span.firstChild;
    alert("Text in row header 2 is " + table.rows(1).cells(0).innerText);
    // We have one hidden row on the client to account for
  }
</script>
© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.