Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
DataTable dt=GetData();

Now I Want to print all the value of Datatable.

Please suggest me about coding to print.
Posted

1 solution

In the below code I have explained about how to print using JQuery.


JavaScript
<script language="javascript" type="text/javascript">

    $(document).ready(function () {
//Hide on the page load
$('#PrintDivID').hide();
//Click event for print the value
        $('#PrintButtonID').click(function () {
//Load ur datatable value into PrintDivID DIV
            $('#PrintDivID').printElement(
             {
                 leaveOpen: true,
                 printMode: 'popup'
             });

        });
    });
    </script>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900