طباعة GridWeb
Contents
[
Hide
]
هناك أوقات يحتاج فيها المطورون إلى طباعة محتويات GridWeb من صفحة ويب دون حفظ النتيجة كملف جدول بيانات Excel Microsoft. يدعم عنصر التحكم Aspose.Cells.GridWeb هذه الميزة عبر وظيفة جانب العميل.
طباعة GridWeb
لطباعة المحتويات ، كشف Aspose.Cells.GridWeb for .NET وظيفة جانب العميل GridWeb.Print التي يمكن استخدامها في استدعاء JavaScript كما هو موضح أدناه.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
<script> | |
function Print(grid) { | |
// Get Id of GridWeb | |
var grid = document.getElementById('<%= GridWeb1.ClientID %>'); | |
// Call print | |
grid.print(); | |
} | |
</script> |
بمجرد تشغيل وظيفة JavaScript ، يمكن تشغيلها في أي حدث تختاره. يرجى التحقق من مقتطف ASP.NET التالي الذي يستخدم وظيفة JavaScript المحددة أعلاه في حدث النقر فوق الزر.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
<asp:Button ID="btnPrint" runat="server" Text="Print" OnClientClick="Print();return false;" /> |