Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2651

JS Error showed when clear grid children component that include frozen

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 7.0.5
    • 7.0.4
    • Components
    • Security Level: Jimmy

      Reproducible sample:

      <zk>
          <zscript><![CDATA[
          ListModelList model = new ListModelList();
          model.add("Dwayne Spielman");
          RowRenderer renderer = new RowRenderer() {
              public void render(Row row, Object obj, int index) {
                  row.appendChild(new Label(obj.toString()));
              }
          };
          void test() {
              grid.getChildren().clear();
          }
          void buildGrid() {
              Auxhead head = new Auxhead();
              head.appendChild(new Auxheader());
              head.appendChild(new Auxheader("Task1"));
              head.appendChild(new Auxheader());
              grid.appendChild(head);
              
              Frozen f = new Frozen();
              f.setColumns(1);
              grid.appendChild(f);
              
              Columns columns = new Columns();
              Column name = new Column("Name");
              name.setWidth("180px");
              name.setStyle("text-align:right");
              columns.appendChild(name);
              Column col = new Column("");
              col.setWidth("90px");
              columns.appendChild(col);
              grid.appendChild(columns);
          }
          ]]></zscript>
          <vlayout>
              Scroll the grid to the right. Afterwards focus in textbox and press enter
              <textbox id="filter" onOK="test()" />
              <grid id="grid" model="${model}" rowRenderer="${renderer}" onCreate="buildGrid()">
              </grid>
          </vlayout>
      </zk>
      

            DevChu DevChu
            vincentjian vincentjian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: