Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Binding asp:DropDownList on asp:Repeater

Reply
Thread Tools

Binding asp:DropDownList on asp:Repeater

 
 
Goncalo Faria
Guest
Posts: n/a
 
      12-02-2003
Hi.

I'll go directly to my problem:

I have a repeater that is binded with data.

For each data row I want the user to be able to change a
field, that is represented by a DropDownList.

My problem is that when binding the DropDownList I am not
able to select a default item that is at an index != 0
(zero).

Here is the code when binding the dropdown:

_dropdown.DataSource = _dataTable
_dropdown.DataTextField = "myTextField"
_dropdown.DataValueField = "myValueField"
_dropdown.DataBind()

_dropdown.Items.FindByValue(_myValue).Selected = True

these instructions are called in an overload method that
is triggered everytime a repeater item is created.

Any ideas?
If you want me to be more specific, pleas reply...

thank's in advance
goncalo

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView binding - how to stop initial binding Amit ASP .Net 6 10-24-2006 08:06 AM
pywin32 COM sort in Excel (late binding fails, early binding works) (+py2exe) kogrover@gmail.com Python 2 10-20-2006 04:08 PM
Complex data binding question, binding child objects of a custom collection. JcFx ASP .Net Datagrid Control 0 06-01-2005 04:01 PM
Data Binding - using inline code vs. functions vs. straight binding Jordan ASP .Net 2 02-10-2004 08:32 PM
value binding and function binding Vivek Nallur Ruby 0 09-25-2003 02:52 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57