N
Nofear
Hi all,
I saw a lots of developers posting question on finding controls in
datagrid footer...
I have experimenting differents solution and find one that needn't
ItemDataBound ou ItemCommand :
Table tbl = (Table)dgWorkgroup.Controls[0];
foreach(TableRow row in tbl.Rows)
{
RequiredFieldValidator val =
(RequiredFieldValidator)row.FindControl("requireValidatorFooterName");
if(val != null)
{
val.Visible = true;
}
}
Casting dgWorkgroup.Controls[0] to Table allow you to scan in the Rows
collection of the table (header and footer included) so on a
particular row you can find your control(s)....
Hope helping you !
Nofear.
I saw a lots of developers posting question on finding controls in
datagrid footer...
I have experimenting differents solution and find one that needn't
ItemDataBound ou ItemCommand :
Table tbl = (Table)dgWorkgroup.Controls[0];
foreach(TableRow row in tbl.Rows)
{
RequiredFieldValidator val =
(RequiredFieldValidator)row.FindControl("requireValidatorFooterName");
if(val != null)
{
val.Visible = true;
}
}
Casting dgWorkgroup.Controls[0] to Table allow you to scan in the Rows
collection of the table (header and footer included) so on a
particular row you can find your control(s)....
Hope helping you !
Nofear.