Hi,
Hope you are looking for JavaScript validation. If it is so, then, the below
given code will help you out :
For eg.,
I have a datagrid with a textbox inside a item template,
<asp:DataGrid id="dgInfo" runat="server" >
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:TextBox ID="txt" Runat=server onchange='return
Validate(this);'><asp:TextBox>
</ItemTemplate>
<asp:TemplateColumn>
</asp:DataGrid>
The javascript function is wired in the textbox server control. The textbox
object ID will be passed to the javascript function. Place your
Validate(this) javacsript function inside the <script> block.
You can either call the onchange function inside the server control in the
asp page, or it can be binded from the codebehind page.
"Irishmaninusa" wrote:
Hello Everyone,
I have a datagrid and have used a text box as way to allow a user to edit
items in the grid. My question for you is how is it possible to write code
for the text change event of the text box. I want to put in some validation
and I don't want to use the validator controls because that seems to
validate all controls that they are assoicated with in the grid and that is
not the desired effect.
If any one could help out here I would really appreciate it. Thanks.
--
J. Daly
Development