On Wed, 19 Nov 2008 00:50:17 -0800, Ty <ty********@gmail.comwrote:
Hi all
following scenario: i have a usercontrol with a search-textbox who
opens a datagrid to show filtered records. unfortunatly this datagrid
is limited to the boundaries of the usercontrol wich limits the height
to some 4 records. (i know i could use a normal dropdowncontrol, but
this is not good enough for some reasons).
right now i've solved it by opening a new borderless form wich is
aligned to the search-textbox. needless to say, this approach is
difficult to handle because this dumy-form is somewhat disconnected to
the searchtextbox.
in general, is it possible to draw a control or usercontrol somewhere
outside it's containers boundaries, somewhere on the screen?
Define "draw". You certainly can place the control in that way. And you
can draw the control in the sense that the display code responsible for
rendering the control can execute normally.
But if you mean "can the control actually be _visible_ outside the parent
container", the answer is generally no. The child control is clipped to
the parent.
One option would be to set the AutoScroll property of the UserControl to
"true", so that at least the user could scroll to see all of the DataGrid.
Another alternative would be to not display the DataGrid inside the
UserControl itself. You could either do it the way you're doing it now,
or just abandon the idea of having the DataGrid physically connected to
the TextBox and show it as a modeless dialog or something like that.
Pete