hello friend i have you can modified this code to applied you validation logic. i have added simple validation like if the textbox value is more then 4 character then it will displayed in red or it will green.
<asp:gridview id="grdView" runat="server" autogeneratecolumns="false" xmlns:asp="#unknown">
<columns>
<asp:templatefield headertext="Validation">
<itemtemplate>
<asp:textbox id="txtValidation" runat="server"></asp:textbox>
</itemtemplate>
</asp:templatefield>
</columns>
</asp:gridview>
<script type="text/javascript">
$(document).ready(function () {
$('[id*="txtValidation"]').blur(function () {
if ($(this).val().length > 4) {
$(this).css("color", "red");
}
else {
$(this).css("color", "green");
}
});
});
</script>