protected void grvEventFeedbackDetailList_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (((GridViewRow)e.Row).RowType == DataControlRowType.Header) return;
if (((GridViewRow)e.Row).RowType == DataControlRowType.DataRow)
{
if (DataBinder.Eval(e.Row.DataItem, "StatusId") == null || (int)DataBinder.Eval(e.Row.DataItem, "StatusId") == (int)StatusTypes.Inactive)
((CheckBox)((GridViewRow)e.Row).FindControl("chkBoxApprove")).Checked = false;
else if ((int)DataBinder.Eval(e.Row.DataItem, "StatusId") == (int)StatusTypes.Active)
((CheckBox)((GridViewRow)e.Row).FindControl("chkBoxApprove")).Checked = true;
}
}
{
if (((GridViewRow)e.Row).RowType == DataControlRowType.Header) return;
if (((GridViewRow)e.Row).RowType == DataControlRowType.DataRow)
{
if (DataBinder.Eval(e.Row.DataItem, "StatusId") == null || (int)DataBinder.Eval(e.Row.DataItem, "StatusId") == (int)StatusTypes.Inactive)
((CheckBox)((GridViewRow)e.Row).FindControl("chkBoxApprove")).Checked = false;
else if ((int)DataBinder.Eval(e.Row.DataItem, "StatusId") == (int)StatusTypes.Active)
((CheckBox)((GridViewRow)e.Row).FindControl("chkBoxApprove")).Checked = true;
}
}
No comments:
Post a Comment