You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Pages: 1
Topic closed
Hi Jing,
Am using the new version 1.2.0 and tried to set print settings to print grid lines but the program crashes when I set it to true. Am getting the following error:
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in mscorlib.dll
Additional information: Index was out of range. Must be non-negative and less than the size of the collection.
Please help
Offline
Hi, can you send your Excel/rgf/code to me? jing at reogrid.net, thanks.
Offline
Here is the code that am using:
Private Sub cmdPrevSheet_Click(sender As Object, e As EventArgs) Handles cmdPrevSheet.Click
Dim sheetPreview = frmEditor.grdData.CurrentWorksheet
Using session = sheetPreview.CreatePrintSession()
sheetPreview.PrintSettings.ShowGridLines = True
previewPrint.Document = session.PrintDocument
previewPrint.SetBounds(200, 200, 1024, 768)
previewPrint.PrintPreviewControl.Zoom = 1.0
previewPrint.ShowDialog(Me)
session.Dispose()
End Using
End Sub
Last edited by deaspo (2016-03-02 18:26:03)
Offline
It looks like necessary to use your data on the worksheet to test the problem, can you send me your Excel or RGF template? please mail to jing at reogrid.net
Offline
Sure
Offline
Thanks for the mail. Now I can confirm the problem and it will be fixed in next release soon. For a temporary solution, you could don't use the PrintSettings.ShowGridLines property, instead it use the following code that makes border line displayed like grid line during print.
sheet.SetRangeBorders(RangePosition.EntireRange, BorderPositions.All, RangeBorderStyle.SilverSolid);
Last edited by Jingwood (2016-03-08 15:10:13)
Offline
This problem has been fixed in version 1.2.1. Please try the latest version: https://reogrid.net/download/
Offline
Pages: 1
Topic closed