enabled the commandbutton when the user first filtered in the datatable and disabled commandbutton when the user no filtered in the datatable.
I try to solve it with javascript but I found solutions in an input when writing but I found no solution when filtered.
<script type="text/javascript"> function txtkeypress(){
var val1=document.getElementById("prueba").value;
var boton = document.getElementById("InsertarAdmitidos");
if(val1=="") boton.setAttribute("disabled","disabled");
else boton.removeAttribute('disabled')
} </script>