S
Santosh
Dear all
i am using datagrid control with in my web page i am adding required
field validator in datagrid i want to activate it only when save
button is pressed for that i am initially set requiredfield validator
enable to false . but on button click event i am changing enable false
to
enable true but still it is not acivated . i am writting following code
for that can any one tell me what is problem with in it.
public void SaveRecords(DataGridItem item, int rowIndex)
{
RequiredFieldValidator logInId_Requiredfieldvalidator =
(RequiredFieldValidator)
item.FindControl("logInId_Requiredfieldvalidator");
RequiredFieldValidator userName_Requiredfieldvalidator =
(RequiredFieldValidator)item.FindControl("userName_Requiredfieldvalidator");
logInId_Requiredfieldvalidator.Enabled = true;
userName_Requiredfieldvalidator.Enabled= true;
}
Regards ,
Santosh
i am using datagrid control with in my web page i am adding required
field validator in datagrid i want to activate it only when save
button is pressed for that i am initially set requiredfield validator
enable to false . but on button click event i am changing enable false
to
enable true but still it is not acivated . i am writting following code
for that can any one tell me what is problem with in it.
public void SaveRecords(DataGridItem item, int rowIndex)
{
RequiredFieldValidator logInId_Requiredfieldvalidator =
(RequiredFieldValidator)
item.FindControl("logInId_Requiredfieldvalidator");
RequiredFieldValidator userName_Requiredfieldvalidator =
(RequiredFieldValidator)item.FindControl("userName_Requiredfieldvalidator");
logInId_Requiredfieldvalidator.Enabled = true;
userName_Requiredfieldvalidator.Enabled= true;
}
Regards ,
Santosh