Displaying Repeating Data

curlydog

Well-known member
Joined
Jul 5, 2010
Messages
50
Programming Experience
Beginner
Hi,
I'm new (very) to forms, having previously developed in asp.net. I'm looking for advice on displaying data on a form that has originated from a database.

In asp.net I have used repeaters to solve the following problem. In my application I have tried using datarepeaters, but I'm not getting the results I want.

My application retrieves information from a database. Initially I need to display a list of owners. I want to display the list as a generic icon with the person's name below it. Each new person is displayed below the previous.

When the user clicks on an owner a second list is displayed. This displays a list of devices belonging to that person. The device can be one of two types. I want to display an icon, dependant on the device type, and the device name for each device the selected person owns. Again I want to display the devices on above the other.

As I mentioned, I have tried to solve this problem using datarepeaters, but not to my satisfaction. They seem overly complicated and I'm getting unexpected behaviour with redraws etc. I have used a dataset with a relation to populate the datarepeaters.

What I'm looking for is a simple way of displaying my lists, other than a simple list of text values. Can someone point me in the right direction as to what controls to use.

As I say, I'm very new to forms so I'm not entirely sure of the concepts I need to consider. I did wonder if I could add a label and a picturebox to a flowlayout and keep adding one for each of my owners/devices. I've looked for somekind of tutorial but I'm coming up blank.

many thanks
Jason
 
I'm not totally sure about your explanation but it seems that what you want is a TreeView control.
I've never used them before so I'm really not sure how to built the tree in run-time, but it sounded like it's the effect you're looking for.
 
I'm not sure where a TableAdapter would come into play here.

Depending on your needs a TreeView could work for you.

If you need something more complex you could create a UserControl to represent how you want your record displayed then add instances of the control to a Panel or FlowLayoutPanel.

The DataRepeater control is supposed to replace the need to create a UserControl. Here's a nice video showing how to use it: http://channel9.msdn.com/Blogs/funkyonex/The-New-DataRepeater-Control-in-the-Latest-Power-Packs-Release
 
Back
Top