Guys Please help I want to remove Pagination,search , info if there is no data found message display
Guys Please help I want to remove Pagination,search , info if there is no data found message display
Td@12345
Posts: 12Questions: 4Answers: 0
Guys Please help I want to remove Pagination,search , info if there is no data found message display
This discussion has been closed.
Answers
They are disabled when no data, that is not good enough? If not, just use css to hide the controls.
add a wrapper around the top and bottom controls:
then you can just do this in the most appropriate place
other options include destroying and rebuilding table with a dom:"t" to hide all of the controls
There is also a plug-in that was developed by a community member to do this sort of thing, which uses basically the method @bindrid describes.
Allan
@bindrid I have tried your solution
$('#AssociatePatientList').dataTable({
blah:blah,
dom: "<'dt-top'lf>t<'dt-bottom'ip>",
blah:blah,
"language": {
"lengthMenu": "Display MENU records",
"info": "Displaying START to END of MAX records"
}});
I am getting blah not define.
Your kidding right?
In case you are, Just take the single line containing the dom:dom: "<'dt-top'lf>t<'dt-bottom'ip>", and add that to your DataTable. so if the above is your entire initialization it would be
@bindrid I am not kidding. sorry i am new in datatable
---------------------Still it shows pagination------------
Trust me on this one - try the plug-in I linked to above.
It will save you writing a custom draw callback function, which you would need to do, if you want to show and hide the table controls based on the data in the table on every draw.
Allan
@allan I will Try It. Can you please give reference URL for implementation Documentation.
I will inform you ance i done with it. Than You Allan
There is documentation comments with examples in the plug-ins source.
Allan