I want to give functionality that exist in megento grid-view like "checked-all","unchecked-all","checked-visible","unchecked visible".
I’m using selgridview extension and extending as above described manner and i stuck with that what if we want to select all check-boxes regardless of pagination and get all the Id’s on single button click.
I go through all the internet sources but none of have this answer.
I attached my code file below and also attached the screenshot for clear understanding.
Please find statement "$("#select-all").click(function(){" in file and tell me what should i write to get this functionality.
So i urge you to help me out with this problem.
Thanks for your time and consideration in advance.
i think you can create the function and call this function on afterAjaxUpdate admin.php
<script>
function checkAll(){
//write a all checkbox select code
}
$(document).ready(function() {
// Handler for .ready() called.
// call this function on page load first time
checkAll();
});
</script>
But my actual question is it’s not possible this way.
Let me explain in detail
for example client click on “select all” button but he will not navigate through pagination and directly click on delete action then on controller side how can we get all records id’s within the grid?
Yes you are right so best way you can add a one more button deleteAll so if user selected all chekbox so you want to deleteall selectedchekcbox option or if you want to delete only one recored you must be only one chekcbox selected then after you may delete this recored.