Hello,
I have a column in my grid where I only want checkboxes in a few of the cells. To accomplish this I set the style to Checkbox on the specific cells I wanted. This works just fine - until I try and print the grid. No checkbox shows up and instead the values "True" and "False" are printed where I am expecting to see a checkbox.
I also tried setting the column Style to Checkbox and then setting the Style property of cells that I did not want to be checkboxes to something else (I experimented with Image and a few others). The print document showed checkboxes in every cell.
What is the easiest way to fix this? Thanks for your time.
- Martin
Hi Martin,
What options are you specifying to the Print method of the grid?
In what event are you setting the Style on the cell(s)?
When you print, the grid layout will be cloned along with all of the rows. No row-level settings are copied over to the clone by default, but the Print/PrintPreview method have optional params to allow you to choose what gets copied over.
Thanks for the responses. Setting the each cell's style to Checkbox in e.PrintLayout seemed to do the trick. Although I'm not too crazy about looping through each row in DisplayLayout to see if the cell's style is a checkbox.
The print method I'm using is: m_Spread.Print(m_Spread.DisplayLayout, doc, RowPropertyCategories.All);
I do not set the style of the cells in an event, but dynamically in other code.