Deleting Gridview rows using Javascript
<p>I have a javascript function to clear my form which includes a gridview, I previously tried another way to delete the rows without postback but somehow when I tried to add a new row, all the previous bounce back. Maybe I am using viewstate to maintain my gridview, not too sure but below is what I am doing which works well but somehow it only deletes one row, I guess probably when the postback occurs, the loop got wiped out. Any advice? I need the loop to delete all my gridview rows. Thanks!   </p>

<pre><code> for (i = 0; i &lt; camGv.rows.length; i++) {
                window.__doPostBack('ctl00$cphBody$gvCamVoucher', 'Delete$0');
            }
</code></pre>
