Hello World!
I'm trying to achieve what can be seen on the picture using grid. What i've done is created my overlay user control, predesign a grid and just draw all over it and synchronized the scrollbar so it actually moves the contorls around. Overlay controls are added to the container that contains the grid, but brought to front. I'd like to have my controls overlayed on the grid area that includes only the scroll region (that is, without headers and zero row on the left). I tried adding a transparent panel with overlay controls and front it over the grid, but it turns opaque...
Is there a general way to add my user control to the specific area on the grid (i.e. the one i'm reffering to above)? Something like the example with checkbox in the header, only with user controls.
Please refer to the attached pic for visual info! (the orange overlay control that overlaps the zero column is exactly what i'm tryin to avoid)
Thank you for Your help, Marko.
Hi Marko,
It sounds like what you will need to do is determine the rectangles within the grid that make up the cells. This is easy enough to do. The UltraGridCell object has a GetUIElement method. This method will return null if the cell is not currently displayed on the screen. If the cell is displayed, you can use the Rect of the returned UIElement to get the position of the cell within the grid. From there, it's simply a matter of converted that rectangle into the same coordinate system of the container - probably the form.