I want to use jQuery with a GridView which contains textboxes, but I'm stuck on how to get event listeners registered for every textbox on the selected row. I was thinking I could do something with a StingBuilder in the Unload event of the GridView but I can't get it working.
+1
A:
Why not just add a CSS class to each TextBox and use a jQuery selector to find them?
<asp:GridView runat="server">
<Columns>
<asp:BoundField ControlStyle-CssClass="someclass" DataField="xxx" />
</Columns>
</asp:GridView>
Then you should be able to do...
$().ready(function() {
$(".someclass").function() {
//do something interesting
}
});
Macka
2008-12-04 14:41:29