I am hiding the entire column in the grid like this?
$('#Grid tr th').each(function(column) {
if ($(this).is('#div.id')) {
hide();
}
});
Can I do like this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think you need to do something like:
Where the number in eq() is the column numbers index (starts from zero). You may also user :first or :last instead of :eq().
You may also use this approach:
for the first column:
for any column with index from 1 (!) in nth-child():
for last column:
For hiding also the title in thead you can use comma separated selectors:
or
or for the first approach:
see the updated example at:
http://www.alexteg.se/stackoverflow/jquery_hide_table_column.html