newbie question regarding repeater control

  • Thread starter Thread starter Bruce Dumes
  • Start date Start date
B

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
 
Hi Bruce,
Comments inline.

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
 

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

Back
Top