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
385
Printing changed GroupByRow description and summaryFooterCaption
posted

Hi I have a problem. I have used code to alter each groupbyrow description and summaryfootercaption.

None of these changes are honoured when my grid is printed(uses default text). Can anyone help me?

 

Code used to change each GroupByRow summaryfootercaption:

For Each gRow As UltraGridGroupByRow In Me.MyGrid.Rows

gRow.Rows.SummaryValues.SummaryFooterCaption=Datatable1.Rows(gRow.Index).Item(1).ToString

 Next

Code used to change each GroupByRow description

 

For Each gRow As UltraGridGroupByRow In Me.MyGrid.Rows

gRow.Description = gRow.Rows(0).Cells(6).Value

Next

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi Geir,

        When the grid prints, it creates a clone of the layout and the rows are re-created. So your code here is applying to the rows of the grid on-screen, but you are not calling the same code on the print rows. 

        What you should do is using the InitializeGroupByRow event instead of looping through the rows. This is more efficient than looping, and the event will get fired for both the on-screen grid rows and the print rows.  

Reply Children
No Data