473,289 Members | 1,875 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,289 software developers and data experts.

Bound Dropdown list not filling before load events.

I have an insert form that I want to double up as a edit form. I pass an id
number by querystring and then in the page_Loadcomplete I call a function
that fills the controls on the page with the data from a datareader.
Some of those controls are bound dropdownlists that have usernames, catagory
types and vendor names in etc. In my fill event I am trying this:
Me.ddlCat.SelectedIndex =
ddlCat.Items.IndexOf(ddlCat.Items.FindByText(Trim( rdr("CatName"))))
to select the correct item from the list. However it is not working. When I
break on my sub and check the ddlcat.items.count in the watch window it is
0. So I can only assume the page isn't loading the dropdowns by the time my
sub gets called. The dropdowns are bound using the wizards in design view of
the ASPX page.
I moved this function call from page load to page load complete in hopes of
fixing it but that didn't work so now I'm a little stumped, I also tried
init_complete with no joy. Any help will be greatly appreciated.
Victoria
May 19 '06 #1
0 1231

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

Similar topics

19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
2
by: Chris Becker | last post by:
This is my attempt to rephrase a question I asked earlier that got no response. I suspect it was my poor/unplanned wording. Here is another attempt: I have a form with some drop down lists. I...
1
by: Mad Scientist Jr | last post by:
I don't know how this is happening, but a dropdown control I have is resetting to the 2nd value on the list anytime a postback occurs. I have no initiation code outside of If Not (IsPostBack) ...
1
by: Randy Rubin | last post by:
Question: Is there anyway to Bind a control i.e.. DropDown Or Textbox to A Database that when a user key's in the 1st few characters is searches and fill the control, for example. The DropDown...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
2
by: Crazy Cat | last post by:
I am using a data-bound combobox with dropdownstyle set to dropdownlist. Teh combobox is bound to a bindingsource which is in turn bound to a table in my database. The table has only 4 rows and I...
5
by: jjsavage | last post by:
Hi all, I've got a DataGridView bound to a DataTable, and I need to make some of the columns into ComboBoxColumns. I've tried some of the solutions listed here, but I can't seem to make them...
2
by: gleadams | last post by:
I have databound a Windows form ComboBox control to a DataSource and DataMember and it is properly showing the data as I navigate through the records. My question concerns the choices in the...
1
by: luispunchy | last post by:
I have an accordion style dropdown list/sublist menu (functions similar to the "today on WebMD video" widget found on http://www.webmd.com/) - it will allow users to click on a headline (from the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
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...

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.