I'm having a problem here and am looking for the answer. I have two
listboxes. One is a dropdown and the other is a simple list of items
which is databound . I want to be able to allow the user to change the
value in the dropdown which would, in turn, change the values in the
list.
So, I create a background routine to change the sql accordingly. Create
routine to respond to the event of the dropdown changing values. Set
autopostback to true. When can I change my sql statement? It seems to
be either before the onselectedindex changed event fires or, if on the
databinding event of the list, it doesn't fire at all after the first
retrieval.
I'm sure this is a common thing. Please, how is it done?
tia,
rts 1 1254
Rex the Strange wrote:
I'm having a problem here and am looking for the answer. I have two
listboxes. One is a dropdown and the other is a simple list of items
which is databound . I want to be able to allow the user to change the
value in the dropdown which would, in turn, change the values in the
list.
So, I create a background routine to change the sql accordingly. Create
routine to respond to the event of the dropdown changing values. Set
autopostback to true. When can I change my sql statement? It seems to
be either before the onselectedindex changed event fires or, if on the
databinding event of the list, it doesn't fire at all after the first
retrieval.
I'm sure this is a common thing. Please, how is it done?
tia,
rts
Never mind. I just worked it out. You need to actually call the binding
method manually from the onselectedindex changed event handler by
specifying:
textboxname.Dat aBind (); (in C#) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tim Jarvis |
last post by:
Hi,
I have an object that I am binding to a text box, this object exposes a
boolean field, and I have implemented a format event handler and a
parse event handler for the binding object, where I convert the bool
value to some meaningful text.
i.e.
Binding b = new
|
by: Kevin Swanson |
last post by:
I'm writing what should be a very simple app against an Oracle database. The
app has a number of user controls, any one of which is loaded into a main
display page using the loadControl method, depending on which menu item a
user selects. Each of these controls follows the same basic pattern: Get a
dataset from the database and then display the results using basic
databinding.
Everything works fine except that I'll occaisionally get an...
|
by: Alec MacLean |
last post by:
Hi everyone,
I have a ComboBox that when changed, calls a method to change the content of
a ListBox.
I'm also using the Listbox's SelectedIndexChanged event to change other
control values on the form.
(It's a Company -> People -> Personal Data relationship)
When I bind my datasource to the ListBox, I find that the
|
by: Steve |
last post by:
I'm trying to implement databinding on a composite control and I'm getting an
error with the data when I change the DataSource. The first time I set the
DataSource and call DataBind() everything works fine, but when I set the
DataSource to a new value (DataTable) and then call DataBind again, I get
some strange results from the command events of some embedded ImageButton
controls... althought the data appears to be displayed correctly, the...
|
by: Nathan Sokalski |
last post by:
I have a very simple UserControl which contains an Image and a Label, which
I use to display an image with a caption. I am using this control inside a
DataList, setting the two Public variables using attributes in the *.aspx
page. Everything displays great for the initial load, but whenever I try to
add or delete an item (I have controls to do this on the page), it does not
seem to be recieving any values for the public variables. Here is...
| |
by: craigkenisston |
last post by:
I have a form with a repeater that is filled from a BLL object, and a
dropdownlist.
The dropdownlist has a parameters that is used in the BLL class, the
number of rows about to be displayed.
I have a databind in the Page_Load and I have a
ddlRowsPerPage_SelectedIndexChanged even in the dropdownlist.
However, I never get the correct number of rows because, the Page_Load
with the databinding is fired first, then the SelectedIndexChange...
|
by: boomhauer |
last post by:
I cant seem to find info online about this so thought id ask..
I have an asp.net 2.0 page that has:
1. an infragistics calendar control
2. a DDL that has an ODS with a param pulled from the calendar
3. a gridview with ODS that binds a param from the DDL key
the problem im having is, on chanigng the infragistics calendar, the
page seems to databind the gridview first, and then the DDL... but
|
by: Vlado Jasovic |
last post by:
Hello,
I'm using typed dataset for databinding to windows controls and I'm having
some problems.
I'm trying to move all business logic to datatable column_changing events
and the problem that I'm having is when I change some other column, control
value doesn't update immediately until I call endcurrentedit on
bindingmanager which doesnt happen until user click update button.
|
by: Peter |
last post by:
Hi!
I am having some very strange behavior with my databound controls. It's
taken a long time to isolate exactly what is provoking the problem, but I'm
still leagues away from solving it.
I have a DataView which filters a DataSet. Bound to this dataview is a
ListBox, via its DataSource property. The DisplayMember is the name property
of the row. Simple enough so far?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |