title: Syncfusion Angular : I want to add multiple rows in grid programmatically
body: <p>I have question in syncfusion treegrid about add multiple rows programmatically, i can add multiple rows but it add's to the last, but i want to add multiple rows at specified index.</p>
  <p>i am sharing a code snippet, please look into it.</p>
  <pre><code>copy() {
      this.MultiSelect = true;
      var allselected = this.treegrid.getSelectedRecords();
      var rows = this.treegrid.getSelectedRows();
      this.copiedRow = rows;
      var crows = [];
      for (let index = 0; index &lt; allselected.length; index++) {
        crows.push(allselected[index]['taskData']);
      }
      this.copiedRows = crows;
      this.copiedRow.forEach(x =&gt; {
        x.setAttribute('style', 'background:pink;');
      });
  }
  
  paste() {
      if(this.copiedRows.length&gt;0)
      {
          var filteredcopiedrows = this.copiedRows;
          var tree = document.getElementsByClassName(&quot;e-treegrid&quot;)[0]['ej2_instances'][0];
          var temp = tree.dataSource.slice()
          filteredcopiedrows.forEach(data =&gt; {
              temp.push(data);
          });
          this.treegrid.dataSource = temp;
          this.dataService.pushData(this.treegrid.dataSource);
          
          this.copiedRow.forEach(x =&gt; {
              x.setAttribute('style', 'background:white;');
          });
          this.copiedRows = [];
  
      }
  }
  </code></pre>