Pages

Showing posts with label gridview. Show all posts
Showing posts with label gridview. Show all posts

Thursday 18 June 2015

Javascript code to add GRIDVIEW row

Introduction:  JavaScript Code to add row to a GridView.

Code:

<script type="text/javascript" lang="ja">
 function AddNewRecord() {
      var grd = document.getElementById('<%=gvportfolio.ClientID%>');
      var tbod = grd.rows[0].parentNode;
      var newRow = grd.rows[grd.rows.length - 1].cloneNode(true);
      tbod.appendChild(newRow);
      }

</script>