1 .Add the Grid View Control to form from the Tool BOx.
2. Add Data Source to the Grid View
3.Then Right Click on the Grid View Control ,select the Edit Template.
4.Add the CHeck box control to the Edit Panel
5.Finally click on the End edit Template.
6.Now Add the Button Control to the Form.
7.Go to Code Behind Page Write the Below Code Smaple in the On button click event.
string id = "";
foreach (GridViewRow gr in GridView1.Rows)
{
CheckBox chk = (CheckBox)gr.FindControl("CheckBox2");
chk.Checked = true;
if (chk.Checked == true)
{
id =id + ","+gr.Cells[1].Text ;
}
txtbxemail.Text = id.ToString();
}
Thursday, January 1, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment