YacharuP says:
<
script
type
=
"text/javascript"
>
$(function () {
$('[id$=grid_dist_registration]').prepend($("<
thead
></
thead
>").append($('[id$=grid_dist_registration]').find("tr:first"))).DataTable({
"responsive": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [{ bSortable: false, aTargets: [0] }]
});
$('[id$=grid_dist_registration] tr:first').eq(0).find('th').eq(0).removeClass();
});
</
script
>
Replace the above with the below code.
<script type="text/javascript">
function pageLoad() {
$('[id$=grid_dist_registration]').prepend($("<thead></thead>").append($('[id$=grid_dist_registration]').find("tr:first"))).DataTable({
"responsive": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [{ bSortable: false, aTargets: [0]}]
});
$('[id$=grid_dist_registration] tr:first').eq(0).find('th').eq(0).removeClass();
$('select').selectpicker();
}
</script>
and remove the On UpdatePanel Refresh complete script i.e.
YacharuP says:
<
script
type
=
"text/javascript"
>
//On UpdatePanel Refresh
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
$('[id$=grid_dist_registration]').prepend($("<
thead
></
thead
>").append($('[id$=grid_dist_registration]').find("tr:first"))).DataTable({
"responsive": true,
"sPaginationType": "full_numbers",
"aoColumnDefs": [{ bSortable: false, aTargets: [0] }]
});
$('[id$=grid_dist_registration] tr:first').eq(0).find('th').eq(0).removeClass();
}
});
};
</
script
>