how to clear grid view in asp.net
in vb.net
gridview.datasource=nothing
gridview.databind()
in c#
gridview.datasource=null;
gridview.databind();
clear gridview by jquery
in vb.net
gridview.datasource=nothing
gridview.databind()
in c#
gridview.datasource=null;
gridview.databind();
clear gridview by jquery
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $("#gv tr:not(:first-child)").html(""); //gv is gridview's id //$("#gv").html("");
//this will clear gridview's row including header }); </script>
Clear All Rows from GridView
gridview1.Columns.Clear();
22:00
|
Category:
|
1
comments
Comments (1)
Thank you!