Click here to Skip to main content
11,569,923 members (55,792 online)

Comments by Alex Perepletov (Top 2 by date)

Alex Perepletov at 11-Aug-11 1:12am View
Is it WinForms DataGridView? In DataGridView one would wire to the CellPainting event. In the event handler, one would get a row from DataSource at index e.RowIndex, and set e.CellStyle.BackColor accordingly.
Alex Perepletov at 21-Jul-11 14:41pm View
PrintDocument raises the PrintPage event repeatedly, as long as the previous call to PrintPage handler returns e.HasMorePages == true. Setting e.HasMorePages inside the loop has no effect on the number of calls to the PrintPage. Only the last 'e.HasMorePages = false' counts. You should change your code, - make 'cl' member variable, - at the end of the function, make 'e.HasMorePages = cl <= 5;' - do not dispose of the dsPRTDB.

Advertise | Privacy | Mobile
Web03 | 2.8.150624.2 | Last Updated 1 Jan 1900
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid