473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Binding asp:DropDownList on asp:Repeater

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

Nov 18 '05 #1
0 1147

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Joe Fawcett | last post by:
I'm having a problem binding an asp:repeater control to a Hashtable. Originally my code was: <asp:Repeater id="rptFamily" runat="server" DataSource="<%# family %>"> <ItemTemplate> <%#...
2
by: Peter Kirk | last post by:
Hi are there any "gotchas" with using an asp:repeater that means that the "onclick" method of a LinkButton created in the repaeter does not fire? I at least cannot get it to work. I have a...
5
by: Scott Lyon | last post by:
I am having a strange problem. The program is a bit complex, but I'll try to simplify what I can. I apologize if this is complicated, but I think this would still be simpler than posting a bunch of...
4
by: Eric | last post by:
Hello, I have the following dataset that I want to bind to a repeater to be displayed as a table. Owner Animal Volume --------------------------- Eric Dog 6 Eric Cat ...
3
by: Kelly Leahy | last post by:
I'm using an Asp:Repeater control with a text box in the item templates. This is for a system that has a number of items that the user can edit and I'd like to generate them based on a list. ...
8
by: dhnriverside | last post by:
Hi I'm using an asp:repeater and its DataSource/DataBind system to show a number of records from the database. I want to highlight the latest record (which will be the highest ID). Any...
3
by: Joe Fawcett | last post by:
Sorry about the multi post, I thought I'd sent to both groups simultaneously but somehow it failed to find this one the first time. I'm having a problem binding an asp:repeater control to a...
1
by: Fred Dag | last post by:
As far as I can work out when using the OnTextChanged event I cannot get the TextBox and Labels values when the event fires as they are populated by a <asp:repeater and so don't have values. If...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
2
by: bissatch | last post by:
Hi, I am trying to output a list of checkboxes. Using ASP .NET controls, I was able to create the following: <label for="colour_red">Red: </label><asp:CheckBox ID="colour_red" runat="server"...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.