I've used template field approach
i want to fetch its value from c#(beckend)
I've already tried
{
GridViewRow row = grdPaymentrelease.Rows(e.RowIndex);
value = ((TextBox)row.FindControl("STATUS")).Text.ToString().Trim();
}
}
on rowdatabound function with e as System.Web.UI.WebControls.GridViewRowEventArgs
giving error - RowIndex is not a member of e
instead I also tried e As GridViewUpdateEventArgs
its asking to make new function
Help!

Gajendra JangidPosted May 29, 2019, 12:01 AM
Bhavleen SinghPosted May 29, 2019, 3:53 AM
{
string Status;
int i;
GridViewRow di = grd.Rows(i);
foreach (var di in grd.Rows)
{
Status = (Label)di.Cells(15).FindControl("lblStatus").Text;
CheckBox chkbx = (CheckBox)grdPaymentrelease..Rows(i).FindControl("CheckStatus");
if (Status == "Y")
chkbx.Visible = true;
else
chkbx.Visible = false;
}
}
its not giving error but its diabling only one checkbox instead of multiple
Gajendra JangidPosted May 29, 2019, 3:42 AM
Bhavleen SinghPosted May 29, 2019, 3:37 AM