We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

index exception with syncfusion pdfgrid.draw

Thread ID:

Created:

Updated:

Platform:

Replies:

118481 Mar 11,2015 09:39 PM UTC Mar 16,2015 11:17 AM UTC WinForms 4
loading
Tags: PDF
jb
Asked On March 11, 2015 09:39 PM UTC

I am using pdfgrid.draw and i get following exception.

at System.Collections.Generic.List`1.get_Item(Int32 index)

   at Syncfusion.Pdf.Grid.PdfGridLayouter.DrawRow(PdfGridRow row)

   at Syncfusion.Pdf.Grid.PdfGridLayouter.LayoutOnPage(PdfLayoutParams param)

   at Syncfusion.Pdf.Grid.PdfGridLayouter.LayoutInternal(PdfLayoutParams param)

   at Syncfusion.Pdf.Graphics.ElementLayouter.Layout(PdfLayoutParams param)

   at Syncfusion.Pdf.Grid.PdfGrid.Layout(PdfLayoutParams param)

   at Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(PdfPage page, RectangleF layoutRectangle, PdfLayoutFormat format)

   at Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(PdfPage page, Single x, Single y, PdfLayoutFormat format)

   at Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(PdfPage page, PointF location, PdfLayoutFormat format)

   at Syncfusion.Pdf.Grid.PdfGrid.Draw(PdfPage page, PointF location, PdfGridLayoutFormat format)


during debugging i noticed that if i add dummy rows to pdfgrid before calling pdfgrid.draw then then code works, excpet the pdf has extra rows tacked on to bottom of grid. 


i can create pdf with no issue if i use individual records from my datasource to generate the pdf, but if i use the netire datasource of 35 rows then i run into this issue. 


is there a max pdfgrid.rows beyond which i have to add additional rows?


my pointF is pointF.Empty


jb
Replied On March 12, 2015 01:46 AM UTC

I am using pdfgrid.draw and i get following exception.

at System.Collections.Generic.List`1.get_Item(Int32 index)

   at Syncfusion.Pdf.Grid.PdfGridLayouter.DrawRow(PdfGridRow row)

   at Syncfusion.Pdf.Grid.PdfGridLayouter.LayoutOnPage(PdfLayoutParams param)

   at Syncfusion.Pdf.Grid.PdfGridLayouter.LayoutInternal(PdfLayoutParams param)

   at Syncfusion.Pdf.Graphics.ElementLayouter.Layout(PdfLayoutParams param)

   at Syncfusion.Pdf.Grid.PdfGrid.Layout(PdfLayoutParams param)

   at Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(PdfPage page, RectangleF layoutRectangle, PdfLayoutFormat format)

   at Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(PdfPage page, Single x, Single y, PdfLayoutFormat format)

   at Syncfusion.Pdf.Graphics.PdfLayoutElement.Draw(PdfPage page, PointF location, PdfLayoutFormat format)

   at Syncfusion.Pdf.Grid.PdfGrid.Draw(PdfPage page, PointF location, PdfGridLayoutFormat format)


during debugging i noticed that if i add dummy rows to pdfgrid before calling pdfgrid.draw then then code works, excpet the pdf has extra rows tacked on to bottom of grid. 


i can create pdf with no issue if i use individual records from my datasource to generate the pdf, but if i use the netire datasource of 35 rows then i run into this issue. 


is there a max pdfgrid.rows beyond which i have to add additional rows?


my pointF is pointF.Empty


I loop though my datatable and for each row i add or dont add to grid. when i add to grid, i add row then add the data. Before the draw method, my pdggrid has 32 rows and that is when it fails. however, if i do add rows before draw then it works. the rows i add have no data, they are just blank rows 

what i noticed is 

if pdfgrid.rows.count < mydatasource.row.count and pdfgrid.rows.count = 32 then failure

------------------------------------------------------

while(pdfgrid.row.count < mydatasource.row.count)
{
   pdfgrid.addrow
}
\.draw

this works

Karthik Krishnaraj [Syncfusion]
Replied On March 12, 2015 06:36 PM UTC

Hi Jb,

Thank you for using syncfusion products,

I am afraid that i couldn't able to reproduce the issue, i have attached a simple sample for which we tried to reproduce the issue, can you please check with these sample and let me know if these helps.

Sample Link:


Thanks,
Karthik


jb
Replied On March 13, 2015 02:57 PM UTC

Hi Jb,

Thank you for using syncfusion products,

I am afraid that i couldn't able to reproduce the issue, i have attached a simple sample for which we tried to reproduce the issue, can you please check with these sample and let me know if these helps.

Sample Link:


Thanks,
Karthik


Resolved the issue. Was not sending in the right data and call.  user error. thanks

Karthik Krishnaraj [Syncfusion]
Replied On March 16, 2015 11:17 AM UTC

Hi Jb,

Thank you for your update,
We are happy to hear your problem has been resolved, please let me know if you have any other queries.

Thanks,
Karthik.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;