Hello,
I have a UltraWinGrid that contains a custom creation filter that will merge cells across the same row for certain rows in the grid. This works fine, but when i set the grid as the Grid for the UltraGridPrintDocument, and call the print function, i am receiving errors in the AfterCreateChildElements method, and this causes the grid to not be printed properly (the cells no longer looked merged).
I have noticed that the error is thrown when attempting to create child elements for a row that is not in view in the grid..
Here is where the error is thrown during printing
if
{
)parent.GetContext();
)row.Cells[TEXT].GetUIElement();
Any help would be appreciated
-Chris
UPDATE:
Actually, ther is no error being thrown above, but cellElement evaluates to null during the printing operation, and this causes issus with my application attempting to resize the cellElement
I can not tell with sure what happend in your creation filter, but if you are using Cell.GetUIElement() on any cell that is not in view, you are probably going to have such "Null exception". If you could provide me small sample or any specific steps to reproduce I will be glad to take a look at your issue further.
Please let us know if you need any other assistance.
Hello Chris,
I am not sure that I completely understood your code, but I get the requirements that you have.
I will create a small sample following them and will provide you the sample here in the forum.
Please let me know if you need any other assistance.
Danko,
Basically, what i was attempting to do was examine the row that was being drawn (by looking at the TYPE cell. IF that 'TYPE' was of a certain type i am looking for, i was looking to do cell merging across the row, so that one cell was completely hidden, and the other spanned the whole row.
thanks!
We have created for you a sample that uses UltraGridPrintDocument and UltraGrid with merged cells across rows where the cells have the same value.
Please take a look at the attached sample and let us know if it covers your scenario.
Hi Danko,
Thanks very much for taking the time to create a sample. I think with some minor changes, I should be able to make this work. I appreciate the time you and your team took. I will let you know if I require any more assistance
Thank you for the provided feedback.