Hello,
I am using an UltraGrid with virtual mode. I need to draw images and show the row numbers on row selectors. The image are drawn based on the height of individual rows and states of the row data. Besides, user can click on the image to trigger an action. I saw some online sample code about displaying row numbers, but I could not find way online about drawing images. We also need to show the triangle image for active row.
I have successfully derived classes from RowSelectorHeaderUIElement and HeaderUIElement for our RowSelectorHeader and column Headers. Class RowSelectorUIElement cannot be derived because it does have any public constructor. Ideally, I would like to have my own row selector class.
Any suggestions will be greatly appreciated.
Thanks,Shaolin
Hi Shaolin,
It might be possible to do something like this using a simpler method. Can you send me a mock-up of how you want the final UI to appear? I'll see what I can do to help you to achieve your design.
Hi Mike,
Thanks for your response!
I derived a class called RowSelectorControlUIElement from class UIElement. I create instance of this class add it as a child of each RowSelectorUIElement object in method AfterCreateChildElements of my creation filter.
The row number is drawn in method DrawForeground. The active row indicator is drawn in method DrawImage.
There is another image that can be of a few different forms based on the row state. The data rows in the grid are either parent or a child and this image is used as connectors between a parent with its child rows. The image shown in the attached screen shot is for a parent row with a Collapsed state. This image is also drawn in DrawImage method. I am having an issue with this image. It does not always showing up for all rows when I do up and down navigation. I put Trace statement inside DrawImage method and the code for drawing this image is definitely called for all visible rows.
I am not sure what I did wrong. If you can come up a better way, it would be great.
Any help is greatly appreciated,
Regards,Shaolin