  let maxShown = 10;
      let count = toNumber(gridColumnsRows.value);
      let countShown = Math.min(count, maxShown);
      let row = diagram.insertRow(0);
      let index = 0;
      for (i = 0; i < countShown; ++i) {
        let padding = row.insertCell(index++);
        padding.width = "4";
        createCell(row, index, true, i == maxShown - 1 && count > maxShown, true);
        index++;
      }
      let padding = row.insertCell(index++);
      padding.width = "4";

      row = diagram.insertRow(1);