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();
}

}
}


Attachments

  • aspx code (40014-32352-grid.txt)
  • Comments

    Author: Salma Noor07 Aug 2010 Member Level: Silver   Points : 1

    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 .

    Author: Mayur Raiyani08 Aug 2010 Member Level: Silver   Points : 1

    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
    .

    Author: Pal (Parthiv) Patel09 Aug 2010 Member Level: Gold   Points : 1

    hey friends for very very nice to feel that your responding

    me in all different resources.

    Give always this type of response.



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: