Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2211
How To: Prevent Blank rows in datasource dt from being removed
posted

Hello again everyone -

 I have a dataset containing a datatable that I have formatted with blank rows for visual reasons and I am looking to export this datatable in an IGrid object.  One of the problems I am having is that all of my blank rows are being removed during export to pdf.  Is it possible to prevent this from happening?

 TIA -

 Patrick

"... I have seen the top of the mountain... and it is good." ~ B.

  • 2211
    Verified Answer
    posted

    Solution:

    Blank rows must have the cell padding set to 0 by default.  To have the blank rows visible, when creating the cell objects and inserting data into them check and see if the data is null.  If it is, set the cell padding.all value to something other than 0.  This will accomplish the task.  EX:

    If dr(i) Is System.DBNull.Value Then

          gridCell.Paddings.All = 5

    End If

     --

    Patrick