Click here to Skip to main content
14,695,085 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Default1.aspx page contain one gridview with checkboxes

Default2.aspx page contain one gridview without checkboxes it is only for display previous gridview rows

i want to pass checkbox selected rows to default2.aspx....?
Posted
Updated 19-Oct-11 4:07am
v3

i dont understand correctly because your question not clear but as i understand: you have to check on each row of this grid if it is selected put it in a session then when you finish you have to rebind the same grid and give it datasource the session that you create (dont forget to check if the session is null)
   
v2
Use for Loop through all gridview rows and check which rows are checked
CheckBox Chk = new  CheckBox();
GridViewRow  drgRow;
string EmployeeID = "";
foreach drgRow In gridview1.Rows
{
    Chk = D.FindControl("ChkSelect");
    if (Chk.Checked)
    {
            EmployeeID = drgRow.Cell(1).Text.Trim();
    }
}


you can check this link[^]
   
Try this
for (int x = 0; x < grd1.Rows.Count; x++)
        {
            
            
            CheckBox chkDoc = (CheckBox)grd1.Rows[x].FindControl("chkDoc");
            if (chkDoc.Checked)
            {
                // apply your code to move to grid 2
            }
        }
   
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900