Hi,
I have a gridview that has a checkbox control for each items. Underneath the gridview, there is a Delete button and the users can delete item(s) by checking the checkbox control and the foreach loop is used to delete item(s). I need to do one check on this delete function - where if an item of the gridview has a filter set to true, then highlight that row and display a message - like the highlighted row cannot be deleted.
I am not sure how to set a back color of that row using a foreach loop.
I have a code like this:
btnDelete_Click
countDelete = 0;
foreach (GridViewRow gr in gvPlanDetails.Rows)
{
if (((CheckBox)gr.FindControl("chkItem")).Checked)
{
countDelete += 1;
PlanDetail pDetail = new PlanDetail();
pDetail.PlanDetailId = Convert.ToInt32(((Label)gr.FindControl("lblPlanDetailsId&quo ...
Go to the complete details ...