Hi,
My topic is not exactly right, because the column headers are colored, but .. I change the text color for cells which contain violations to red via row.Cells["sample_mean"].Appearance.ForeColor = Color.Red; But in the print previews and printnigs this is always black.. My print function looks like this:
private System.Drawing.Printing.PrintDocument c_pdSetup = new System.Drawing.Printing.PrintDocument();
private void pshGridPrint_Click(object sender, EventArgs e){ // display page setup dialog c_pdSetup.DefaultPageSettings.Landscape = true; c_pdSetup.DefaultPageSettings.Color = true; pageSetupDialog1.Document = c_pdSetup; if (pageSetupDialog1.ShowDialog() == DialogResult.OK) this.SampleDataGrid.PrintPreview(this.SampleDataGrid.DisplayLayout, c_pdSetup);
}
I'm not sure what the problem is then, since it worked for me. You should submit a small sample to Developer Support.
-Matt
I have now updated the controls to v8.1 with the latest hotfix and moved the changing of the forecolor to the InitializeRow event - but PrintPreview()-method still shows the values in black..
Your code worked correctly for me, assuming that you're changing the ForeColor of the cells in the InitializeRow event. If you're not changing the color there, it's possibly that your settings will not be applied to the printed grid. If you are doing what I mentioned, then I suggest that you download the latest hotfix to see if your issue is resolved.
I have tried it with a sample app where I only added a ultraGrid and formatted it like above. The same effect happens there. I am using v7.2, is this a bug, or am I using the wrong formatting with ".Appearance.ForeColor" ?