Not sure if this will help, but the way I do it (may not suite your coding style) would be to directly check the string length of the element within the onUpdateCommand Sub-Procedure which has been called from the datagrid, in the form of:
Code:
Sub updateDG(Sender as Object, e as DataGridCommandEventArgs)
Dim currentTextbox as Textbox
currentTextbox = e.Item.FindControl("txtDescription")
If (currentTextbox.text.length < 5) Then
' code to generate error message
' code to reset the datagrid
Exit Sub
End If
'Code to update the datasource based on correct length ...
End Sub
I find this a more direct method.
--------------------
:) James Sellwood :)
--------------------