Allows the user to hide a selected column by controlling the styling(CSS).
xxxxxxxxxx
public hide() {
Get the index of the selected table-header(th) .
xxxxxxxxxx
const index = (<HTMLTableCellElement>this.document.querySelector(".TH")).cellIndex;
Retrieve the styling rule declaration associated with this index using. - the style tag - CSS styling rule .
xxxxxxxxxx
const style_sheet = <CSSStyleSheet>(<HTMLStyleElement>this.get_element('columns')).sheet;
//
const declaration:CSSStyleDeclaration =(<CSSStyleRule>style_sheet.cssRules[index]).style;
Change the display property to none to hide the selected element.
xxxxxxxxxx
declaration.setProperty("display", "none");
}