Hide column from dynamic table
I have created a table using some codebehind logic. When a button is clicked on the page the table is shown. What i would like to do is hide certain columns. So far using the code
- <script type="text/javascript">
- $(document).ready(function () {
- $('#<%= btnHide.ClientID %>').click(function () {
- $('table#tblName td:nth-child(1)').hide();
- });
- });
- </script>
hides the columns as required when i have the table created at design time but using the same code as above with a dynamically created table doesnt seem to hide any columns?
Could anyone help?
Thanks