A simple script to apply the breakdown style on bootstrap in asp.net gridview

Is there any simple jquery script / plugin to apply pagination style in asp.net gridview? I found some useful tips on how to do this, such as these links: here and. the only problem with these tips / solutions is that we need to make many changes to achieve the result, and this is not preferred when you have a large application and you want to convert it to a bootstrap style. we need a different solution. like a simple jquery script that can do the job without making changes to the current code.

+4
source share
1 answer

I made a simple jquery script to apply partitioning in asp.net gridview, and I think it would be useful to split it here in stackoverflow. The source code for this script is posted on github here .

use is very simple:

-include js plugin file in asp.net page file:

<script type="text/javascript" src="js/bs.pagination.js"></script>

-set gridview property:

PagerStyle-CssClass="bs-pagination"

this is all you need to apply the asp.net gridview pagination style.

check out the blog for more information.

Edit:

gridview UpdatePanel, , "UpdatePanel . , , , , ."

:

1:

pageLoad() $(document).ready. :

function pageLoad() {
            $('.bs-pagination td table').each(function (index, obj) {
                convertToPagination(obj)
            });
        }

Solution2:

. , bs.pagination.js:

var prm = Sys.WebForms.PageRequestManager.getInstance();

prm.add_endRequest(function () {
    $('.bs-pagination td table').each(function (index, obj) {
        convertToPagination(obj)
    });
});
+14

Source: https://habr.com/ru/post/1531896/


All Articles