Nested repeater with controls
I need to create a user interface that resembles the following:
cat 1 Add Category Add Point
cat 1a Add Category Add Point
point
cat 1b Add Category Add Point
point
point
cat 1c Add Category Add Point
cat 1c1 Add Category Add Point
cat 1c2 Add Category Add Point
point
I was thinking about using a repeater with nested repeaters but I am confused on how to go about this. Also within the repeater when the "Add category" or "Add P开发者_JAVA技巧oint" are clicked I need to show an data entry field with a button within the repeater if possible. is a repeater even a good control to use?
Copied from the comments in the question: I think a custom user control would be ideal here. The user control would nest children items of itself or a set of 'points'. Also, it would support an 'Add Category' or 'Add point' button. You could keep values such as degree of nesting in the ControlState and can use it to pad the left-most label with respect to the containing control.
You can check this link to see how to add a user control. You will optionally also have to do some additional work to maintain the depth of the control using the Control State.
精彩评论