Hi,
I am trying to validate data in the table cell when the user enters the information. Each cell in the table will have different validation methods. I have a table with 15 cells and 100 rows. some of the cells will be hidden based on some settings. so I cannot use cellIndex to define events. so to define validation rules on each cell this is what I did
jQuery(function ($) {
$('table#<%= MyTable.ClientID %> tr td input[type=text]').filter('input[id*=tCell1]')
.bind('blur', validateCell1);
$('table#<%= MyTable.ClientID %> tr td input[type=text]').filter('input[id*=tCell2]')
.bind('blur', ValidateCell2);
$('table#<%= MyTable.ClientID %> tr td input[type=text]').filter('input[id*=tCell3]')
.bind('blur', ValidateCell3);
$('table#<%= MyTable.ClientID %> tr td input[type=text]').filter('input[id*=tCell4],input[id*=tCell5]')
.bind('blur', ValidateCell4and5);
});
since I am attaching "onblur" event on each cell, it is loading slow. Is there any other way for this?
Thanks, sridhar.