Gridview Inside Gridview with two tables
Here i put code which will help you to understand concept of gridview inside gridview.
I have to 2 different tables::
1=studMast
>>studId
>>StudName
2=StudRollno
>>StudId
>>StudName
what i want is?
i want enter student roll no in ascending order of name.
in first table we insert data randomly.
so name is not come in ascending order.
we take gridview inside gridview to see the no of give the rollno.
.................See the Attechment for .aspx file.............
Code Behind ::
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
temp();
}
}
public void temp()
{
GridView1.DataSource = cs.getStudMast();
GridView1.DataBind();
for (int i = 0; i < GridView1.Rows.Count; i++)
{
GridView inner = (GridView)GridView1.Rows[i].FindControl("gvInner");
Label StudId = (Label)GridView1.Rows[i].FindControl("lblStudId");
inner.DataSource = cs.getRollNo(StudId.Text);
inner.DataBind();
}
}
}
hi parthiv
Now you are in good postion
this articl is osm .
keep it buddy.
now what is your next goal buddy.
i think u r now goin to 1 in dns .