طباعة GridWeb
Contents
[
Hide
]
هناك أوقات يحتاج فيها المطورون إلى طباعة محتويات GridWeb من صفحة ويب دون حفظ النتيجة كملف جدول بيانات Excel من مايكروسوفت. يدعم تحكم 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;" /> |