Home All Groups Group Topic Archive Search About

newbie question regarding repeater control

Author
7 Apr 2005 4:30 PM
Bruce Dumes
Hello -

I've got a project where I need to create a table like:

| text1  |  text 2  |  dropdownlist |  text input box |


The dropdownlist will be populated differently, or could be, for each row.

Is the repeater control the right one to use for this?  If so, how do
you use a dropdownlist in a repeater?  I've used it for displaying text
items and was able to add an asp button to one of the items, but I can't
figure out how to build a dropdownlist into it.

I tend to code by hand rather than using Visual Studio to design
anything.  Am I making this harder or easer on myself? :-)

One other question:  There will most likely be more items in this table
than I can display on one page.  Is there a built-in way of paging with
the repeater control or do I need to account for that myself?

Many thanks!

Bruce

Author
7 Apr 2005 6:51 PM
Marcie Jones
Hi Bruce,
Comments inline.

On Thu, 07 Apr 2005 09:30:45 -0700, Bruce Dumes <brucedu***@dumes.net>
wrote:

>Hello -
>
>I've got a project where I need to create a table like:
>
>| text1  |  text 2  |  dropdownlist |  text input box |
>
>
>The dropdownlist will be populated differently, or could be, for each row.
>
>Is the repeater control the right one to use for this? 

Sure, a Repeater should be fine, see remarks below on paging.

>If so, how do
>you use a dropdownlist in a repeater?  I've used it for displaying text
>items and was able to add an asp button to one of the items, but I can't
>figure out how to build a dropdownlist into it.

This article explains how to bind a DropDownList inside a Datagrid,
the same techniques will apply to a Repeater:
http://www.dotnetjunkies.com/Tutorial/42ACA3E5-103C-4FC3-ACB3-25D13EB11DC3.dcik

>I tend to code by hand rather than using Visual Studio to design
>anything.  Am I making this harder or easer on myself? :-)

It depends :)  When I was starting out I coded everything by hand,
which really helped me learn the syntax cold, and learn a lot about
..NET.  On the other hand, there are some features in the IDE which can
speed up your development time.


>One other question:  There will most likely be more items in this table
>than I can display on one page.  Is there a built-in way of paging with
>the repeater control or do I need to account for that myself?

There's no built-in paging for the Repeater, so you could either add
it yourself (plenty of articles out there explain how), or you could
use a Datagrid control which has paging built in.

>
>Many thanks!
>
>Bruce

Marcie