-1

I want to implement the results similar to the below url but instead of hiding the first column i need to hide the second column header as in the below image. Table has multiple column headers. Need to hide the EmpId column But it should not change any values related to second column top header and bottom header values.

Requirements similar the following url

Need to hide the EmpId column But it should not change any values related to second column top header and bottom header values

Community
  • 1
  • 1
sanju m
  • 1
  • 1

1 Answers1

0

Try this:

$("input").on("click", function(e)
{
    e.preventDefault();

    var empIdElements = $('.resultGridTable tr:not(.master) th:nth-child(2), .resultGridTable tr:not(.master) td:nth-child(2)');

    empIdElements.toggle($(this).val() == 'Show EmpId');
});

http://jsfiddle.net/UqdQp/64

Bob Dust
  • 2,370
  • 1
  • 17
  • 13
  • Thanks in advance. The problem i am facing is second column data value(Type - from your example) is appearing in first column data when i hide the EmpId column in the first column.I need to avoid that it should not pull any second column .values into first column data. – sanju m Oct 24 '16 at 07:45
  • Thanks Bob...We need to handle with colspan ...Looks great – sanju m Oct 26 '16 at 07:14