I am doing a project in asp.net 3.5 (c#) where I have used a GridView inside another GridView. The problem, however, is that I dont know how to use the PageIndexChanging Event for the Child GridView.. Anyone with a solution please help me..!! Thanks in advance.. I am uploading the code that fills the two grids..
private void dynamic_GV1()
{
DataSet ds_news_details = new DataSet();
DataSet ds_pic_preview = new DataSet();
ds_news_details = BL_News.News_Details_Top10_Select();
if (ds_news_details.Tables[0].Rows.Count > 0)
{
GridView1.DataSource = ds_news_details;
GridView1.DataBind();
int counter;
for(counter = 0 ; counter < ds_news_details.Tables[0].Rows.Count; counter++)
{
GridView gv_pic = (GridView)GridView1.Rows[counter].FindControl("GridView2");
ds_pic_preview = BL_News.News_Pictures_Select(Convert.ToInt32(ds_news_details.Tables[0].Rows[counter][0].ToString()));
gv_pic.DataSource = ds_pic_preview;
gv_pic.DataBind();
}
}
}