The follwoing code worked for me.
var totalRows = $("#<%=gvCustomers.ClientID %> > tbody > tr").length;
if(totalRows >1){
$('[id*=gvCustomers]').prepend($("<thead></thead>").append($(this).find("tr:first"))).DataTable({
"responsive": true,
"sPaginationType": "full_numbers"
});
}
Thanks