Monday, 27 November 2017

HTML Table Operation

HTML Table Operation


Hide Table Column


$('#table-name th:nth-child(column-no)').hide();

$('#table-name td:nth-child(column-no)').hide();

Example:
$('#tblService th:nth-child(4)').hide();
$('#tblService td:nth-child(4)').hide();


Get selected column data using rowid


Syntax:
$("RowId”).find('td').eq(ColumnIndex).text();

Example :
$("#r123”).find('td').eq(0).text();