I have a requirement when an item is updated in my radgrid for a descriptive comment to be added to that item. I've added a Required Field Validator to a GridTemplateColumn and it works if this update is the first update of that item and the comment field is empty. However, if someone has updated the item before, it views the previous comment as making the field valid and doesn't fire. This is that code
I also tried deleting the <%# Eval("Comments") > from the Text field and replacing it with "". That blanks out the previous text and forces a new comment, but the new comment data is not returned to be entered in the database. (Sql profiler shows NULL for that parameter).
So, I'd appreciate any help in requiring a new unique comment for subsequent updates.
Thanks
Rick
<
telerik:GridTemplateColumn
DataField
=
"Comments"
FilterControlAltText
=
"Filter column13 column"
AllowFiltering
=
"false"
<br> HeaderText="Comments" UniqueName="Comments"><
br
> <
EditItemTemplate
><
br
> <
asp:TextBox
ID
=
"tbComments"
runat
=
"server"
TextMode
=
"MultiLine"
Text='<%# Eval("Comments") %>'>></
asp:TextBox
><
br
> <
asp:RequiredFieldValidator
ID
=
"rfvComments"
ControlToValidate
=
"tbComments"
Display
=
"Dynamic"
<br> runat="server" ErrorMessage="Please enter a reason for changing this budget item."></
asp:RequiredFieldValidator
><
br
> </
EditItemTemplate
><
br
> <
ItemTemplate
><
br
> <
asp:Label
ID
=
"CommentsLabel"
runat
=
"server"
Text='<%# Eval("Comments") %>'></
asp:Label
><
br
> </
ItemTemplate
><
br
> </
telerik:GridTemplateColumn
>
I also tried deleting the <%# Eval("Comments") > from the Text field and replacing it with "". That blanks out the previous text and forces a new comment, but the new comment data is not returned to be entered in the database. (Sql profiler shows NULL for that parameter).
So, I'd appreciate any help in requiring a new unique comment for subsequent updates.
Thanks
Rick