grid view databound event
<p>how data bound event of grid view is used and how is it called could somebody elaborate a bit on this please
i bind gridview on button click like this</p>

<pre><code>DataTable dt = placedStudentManager.GetPlacedStudentList(sb, passoutYear, courseList);
                if (dt != null &amp;&amp; dt.Rows.Count != 0)
                {
                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                    GridView1.Visible = true;
                    Btnsave.Visible = true;
                    ViewState["dt"] = dt;
                }
</code></pre>

<p>and whenever i need it again to bind i use view state like this, but can data bound event be any use instead of having view state can i use directly data bound event or some good alternate exist please let me know</p>

<pre><code>protected void GridView1_PageIndexChanging(object sender, GridViewPageEventArgs e)
    {

        GridView1.PageIndex = e.NewPageIndex;
        GridView1.DataSource = (DataTable)ViewState["dt"];
        GridView1.DataBind();
        GridView1.Visible = true;
        Btnsave.Visible = true;
       // StringBuilder str=(StringBuilder)ViewState["chk"];
        //foreach (GridViewRow row in GridView1.Rows) 
        //{ 


    //}

}
</code></pre>
