Hi Friends,
Need help
I have a Grid which shows no's of employee in it
where ONE column has a check box and other are employee details column.
so when i check respective employee check box.
I should be able to fill their information one by one and update in a form designed below grid. and at last the record to be updated in grid.
Please help
Thanks and regards
Loading
suhail pawanePosted Dec 16, 2011, 12:09 AM
in the loop i have to accept fields value and on Update button click the loop should increament and fetch next employee to fill the details.
Pankaj RanaPosted Dec 15, 2011, 11:45 PM
{
for (int i = 0; i <= grdUser.Rows.Count - 1; i++)
{
cb = (CheckBox)grdUser.Rows[i].FindControl("statusCheck");
hddid = (HiddenField)grdUser.Rows[i].FindControl("checkid");
hddval = Convert.ToInt32(hddid.Value);
if (cb.Checked)
{
hidAllValue = hidAllValue + hddval + ",";
}
}
try
{
hidAllValue = hidAllValue.Substring(0, hidAllValue.Length - 1);
SetStatus(hidAllValue, 1);
lblmessage.Text = "Activate successfully.";
}
catch (Exception)
{
lblmessage.Text = "Atleast one option must be checked";
}
}