Winforms Repeater Container

G

Guest

Hello,

I'm developing an application using the 2.0 framework, and I am in desperate
need of some kind of WinForms Repeater Control. I have a user control which
contains a number of textboxes, buttons, labels, etc. The control represents
one line item within a quote (which could contain up to 150 line items). The
user control has an expanded view and a collapsed view (both views still show
controls for which the user can edit the underlying data). The collapsed view
contains about 1/3 of the number of controls that the expanded view contains.
I need these controls to repeat vertically inside some kind of scrollable
container. It would also be nice if the container would autosize each of the
"rows" of the container depending on the size of the contents within (ie: if
there are 10 repeated controls and the user collapses control number 8, then
control 9 and 10 should "snap up" to the bottom of control 8 automatically).
One automatically thinks of a datagridview in this situation, since it will
scroll contents and has the capability to programmatically change the row
height. Unfortunately, I'm finding it extremely difficult to host my own user
control within a datagrid view. I can get it to show up in edit mode, but I
need my controls to always be visible and editable. Is there some kind of
WinForms repeater (analagous to the ASP.NET repeater control) that I can use
to accomplish this feat?

Thanks in advance,

-Pete Zappulla
 
G

Guest

I'm still looking for answer to this issue. Can anyone make any suggestions
at all on how to proceed?

Thanks in advance!

-Pete Zappulla
 
G

Guest

For anyone who interested... I finally figured out a way to do this. Using
the new Flow Layout Panel (in Visual Studio 2005), I was able to acheive this
functionality. The flow layout panel has the capability to automatically
scroll when its contents surpass the bounds of the control. It also
automatically "snaps" controls together when one control changes size. Just
dynamically add however many instances of whatever user control you want to
the FlowLayoutPanel with code, and the rest is a piece of cake. Just a word
of caution... things do start to get a bit slow when you add a lot of
controls to the container.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top