473,657 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_Loadcomple te 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.Selec tedIndex =
ddlCat.Items.In dexOf(ddlCat.It ems.FindByText( Trim(rdr("CatNa me"))))
to select the correct item from the list. However it is not working. When I
break on my sub and check the ddlcat.items.co unt 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 1267

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

Similar topics

19
4091
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 the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can easily understand a newbie using bound controls or someone with a tight deadline. I guess I need...
2
3620
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 would like the user to be able to start filling in the form, then get to one of the dropdown lists (ex: Service Type) and realize that the dropdown list does not contain the entry that they need. So next to the Service Type drop down list is a...
1
3650
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) I have EnableViewState set to true for the control - the control stays populated, it just is losing its selected value. The control is not contained in any panels or anything, just a Web
1
1397
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 has the values of Apple, Pear, Grapes. When a user clicks the Control a types Gr is goes to grapes... Thanks Randy
2
4545
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 set to...it is set to false. Can someone show me what I am doing wrong and tell me the correct way? Thank you. In the page load event, I am doing the following:
2
1952
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 am using it to display geographical regions - Northeast, Southeast, West, and Central. In the bindingsource AddNew is set to false. Whenever I select an item from the combobox I find that the position in the dropdown list is replaced by the...
5
2051
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 work. They might not be the solutions I'm looking for; I just want to have a few arbitrary values for a combo box and make sure everything in that row is one of those values. My boss won't let me just leave them as text boxes. How do I tell the...
2
1824
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 pull-down list itself. The Field is Priority and the only available choices should be "High", "Low", "Do Not Call". These are the only choices I would like to see in drop-down, but because it is bound to the column it is showing multiple instances...
1
2662
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 main list) to open up the full listing (sublist) below that headline. My JavaScript is almost but not quite working as needed. It also serves up an error that an object "has no properties". The particular error message and line of code it refers to:...
0
8315
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8829
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8734
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6172
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2733
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.