BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Thank you for your interest in Syncfusion products.
I have attached a simple sample for your reference regarding
how to add page number into grid cell,
We hope it will be helpful for you, please let me know if
you need any further assistance.
Karthik
Hi Mark,
Sorry
for the inconvenience caused, for now we don’t have support for adding page
number in Pdf Grid at respective cell position, whereas this is possible using
PdfLightTable, I have attached a simple sample for your reference can you
please check through it and let me know if you need any further assistance, I
have included a code snippet about the working of cell layout event below please look
through it.
//This
event will be called every time when cell is created
private void lightTable_BeginCellLayout(object sender, BeginCellLayoutEventArgs args)
{
//Use
to draw at specified cell index
if (args.CellIndex == 1)
{
//Getting
the boundaries of the Cell
RectangleF rect = new System.Drawing.RectangleF(args.Bounds.X, args.Bounds.Y,
args.Bounds.Width, args.Bounds.Height);
//Create
page number field
PdfPageNumberField pageNumber = new PdfPageNumberField(font, brush);
PdfPageCountField count = new PdfPageCountField(font, brush);
PdfCompositeField compositeField = new PdfCompositeField(font, brush,Page NO {0}", pageNumber);
//Drawing
Page number in respective boundaries of cell
compositeField.Draw(args.Graphics, new System.Drawing.PointF(rect.X, rect.Y));
}
}
Thanks,
Karthik