Posted 21 February 2021, 5:00 pm EST
Hello,
I am passing a DataGridView full of data to dynamically generate a code based section report.
I need to create labels across the top of the Groupheader that matches the column text of the grid columns, and also need textboxes in the Detail section.
The with of the grid columns are in pixels, yet on the report I need to place the location and size in inches. How can I set the width of a label and textbox so it closely matched the width of the grid columns?
For example I have 5 columns with the follow grid column widths
Stock Number = 50
Description = 150
Price = 50
Quantity = 25
Held = 25
What math would I use to place textboxes/labels across the report matching the widths?