Hi,
Use this if ur binding data at the time of databinding
protected void gv_RowDataBound(object sender, System.Web.UI.WebControls.GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow) {
GridView gv = e.Row.FindControl("GridView2");
SqlDataSource dbSrc = new SqlDataSource();
dbSrc.ConnectionString = ConfigurationManager.ConnectionStrings("NorthwindConnectionString2").ConnectionString;
dbSrc.SelectCommand = "SELECT * FROM Orders WHERE CustomerID = '" + e.Row.DataItem("CustomerID").ToString + "' ORDER BY OrderDate";
gv.DataSource = dbSrc;
gv.DataBind();
}
}