Gridview validate each textbox within the grid view using jquery
<p>I've got some jquery to validate a textbox to ensure a number or decimal (its not the prettiest but its ok for now):</p>

<pre><code>  $('#LineItemContent_txtLIQuantity').keydown(function (e) {
            var key = e.which;
            var myVal = $('#LineItemContent_txtLIQuantity').val();

            //check if a period was entered
            if (key == 190) {
                //you should only allow one period
                //this checks if a period exists already
                if (jQuery.inArray(".", myVal) &gt; -1) {
                    //period already exists dont allow it
                    e.preventDefault();
                }
            }

            // backspace, tab, left arrow, up arrow, right arrow, down arrow, delete, numpad decimal pt, period, enter
            if (key != 8 &amp;&amp; key != 9 &amp;&amp; key != 37 &amp;&amp; key != 38 &amp;&amp; key != 39 &amp;&amp; key != 40 &amp;&amp; key != 46 &amp;&amp; key != 110 &amp;&amp; key != 190 &amp;&amp; key != 13) {
                if (key &lt; 48) {
                    e.preventDefault();
                }
                else if (key &gt; 57 &amp;&amp; key &lt; 96) {
                    e.preventDefault();
                }
                else if (key &gt; 105) {
                    e.preventDefault();
                }
            }
        });
</code></pre>

<p>This works for one textbox...
Now I've got a textbox within a gridview, so imagine multiple rows in the asp.net gridview.  Each one generates a textbox so I want to use this jquery for this field..I tried to do something liek this just to see if I can get an alert:</p>

<pre><code>$("#LineItemContent_gvLineItems_txtLIQuantity input[id*='txtLIQuantity']").each(function (index) {
        alert("hello");
    });
</code></pre>

<p>But no alert, the HTML generated shows the field as:</p>

<p><code>id="LineItemContent_gvLineItems_txtLineItemQuantity_0"</code></p>

<p>And continues down like this.  How can I apply this jquery to each of these items??  Basically all I am looking to do is call the jquery event for each text box in my grid view?  Please anyone?</p>
