2 Replies Latest reply on Apr 26, 2017 7:59 AM by cmoke73

    check if supreme row is a HEAD-ROW

    cmoke73 Level 1

      Hello.

      the snippet below worked for a while. After some changings in my script it doesn´t...

       

      I´ve verified it: the table I want to change HAS a head-row. But the script doesn´t recognize it (?) and parses the content of the IF-condition, it shouldnt.

       

      ...
      myTable = allSelection[i].tables[0];
      var myFirstRow = myTable.rows[0];  
      var myLastRow = myTable.rows[-1];  
           // Wenn die erste Zeile keine Kopfzeile ist ...
          if(myFirstRow.rowType != "HEADER_ROW"){
              alert(myFirstRow.rowType);
              // ... diese in eine Kopfzeile konvertieren
              //myFirstRow.rowType = RowTypes.HEADER_ROW;
              }
          // Wenn die letzte Zeile keine Fusszeile ist ...
          if(myLastRow.rowType != "FOOTER_ROW"){
              alert(myLastRow.rowType);
              // ... diese in eine Fusszeile konvertieren
              //myTable.rows[-1].rowType = RowTypes.FOOTER_ROW;
              }
      ...
      

       

      Is something wrong within?