Hello ,
In an ASP.Net page, there are some DropDownLists used
for adding some conditions to a Select statement, a
button (server-side, too).
And in the same page there is a ListBox that must be filled by Click
event
handler of my button. Everything is ok, but ...
it is something very strange with the ListBox (autopostback = true)
because I cannot select any item, for each click ...my cursor jump
back to the
first item (SelectedIndex = 0 ).
Please where is the problem? In the order of recording the events
...or ..where ?
When I run the code under the debugger ..there are some situations
when the "SelectedIndexC hanged" event is not fired .
Thank you very much for any hint, url, advice !
Have a nice day,
DanielG 1 1305
Pls check your onload event
Dont re-load the data in your listbox for postback.
"Daniel G" wrote: Hello ,
In an ASP.Net page, there are some DropDownLists used for adding some conditions to a Select statement, a button (server-side, too). And in the same page there is a ListBox that must be filled by Click event handler of my button. Everything is ok, but ... it is something very strange with the ListBox (autopostback = true) because I cannot select any item, for each click ...my cursor jump back to the first item (SelectedIndex = 0 ).
Please where is the problem? In the order of recording the events ...or ..where ?
When I run the code under the debugger ..there are some situations when the "SelectedIndexC hanged" event is not fired .
Thank you very much for any hint, url, advice !
Have a nice day, DanielG This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Oddball |
last post by:
Ok - I have a ListBox control and I'm ready to write my own DrawItem event handler.
What I want to draw as the item is another control. I have created a user control that I
would like to list in this listbox but I can't for the life of me figure out how to draw the
control inside ListBox...
I get as far as:
private void lbImageList_DrawItem(object sender,
System.Windows.Forms.DrawItemEventArgs e)
|
by: Chris Leuty |
last post by:
I am populating a multiselect Listbox from a dataset, with the content of
the listbox filled by one table, and the selections determined from another
table. So far, I have been keeping the dataset a denormalized mirror of the
database, but I'm not having much luck getting the selection logic down (I
haven't found a 'hook' where I can access the listbox object as an object to
set the listitem's selected property before it gets rendered)..
...
|
by: Steve Schroeder |
last post by:
For some reason I cannot get the OnSelectedIndexChanged event to fire for a
listbox I have on a page. I'm able to populate the listbox with data from a
stored procedure, but cannot trigger the event. I do have EnableViewState =
True for the listbox. I'm imagining (wanting) to populate the listbox named:
lstNames by using the DataValueField from lstDepartments.
It's quite apparent though that the event is not triggering as I can misname...
|
by: John Dann |
last post by:
I'm still struggling to find a way of reordering the items within the
same single listbox with drag and drop. I think I've got the drag
working but it's the drop code I can't figure out. What I have
currently is (with the listbox set to AllowDrop):
Sub MyListBox_MouseDown(args etc...)
DoDragDrop(MyListBox.SelectedItem, DragDropEffects.Move)
End Sub
Sub MyListBox_DragEnter(args etc...)
|
by: rn5a |
last post by:
I have 2 ListBoxes which get populated with records from a database.
The Form has a Button as well. Note that users can select multiple
items in both the ListBoxes.
When a user selects items from the 1st ListBox & clicks the Button,
the selected items get deleted from the 1st ListBox & get appended to
the 2nd ListBox at the very end. I also want that the items that have
just got appended to the 2nd ListBox should also get selected. In...
| |
by: zdrakec |
last post by:
Hello all:
Clearly, I'm not getting it! Here is the scenario:
On a web page, I have two list boxen and a text box. The first listbox
is populated at page load time (if it is not a postback). This listbox
has AutoPostback = True. When the user selects an item from this list,
the second listbox is populated with more items relevant to this
selection. I am using an SQLDataSource web control for this. These
items are headers. I want, when...
|
by: =?Utf-8?B?U3RlcGhlbiBSaXRjaGll?= |
last post by:
Hi
NET1.1 / Winforms
I have a listbox that I am binding to a table via the DataSource property.
However I want to be able to programmatically select values in this listbox
so I am using the code below...
With lstJobTypes
.DataSource = BusinessRules.Common.JobTypes.All(True)
|
by: Scott Price |
last post by:
I'm not quite ready to give up on this yet... Using MS Access 2003, WinXP SP2.
I have a listbox that I'm trying to get to highlight (select) a specific record using the GotFocus event (the listbox setfocus is passed by a combobox afterupdate event).
The code I have is:
Private Sub lstRate_GotFocus()
Dim rs As DAO.Recordset
Dim SelDate As Date
'Dim MyVarBM As Long
|
by: Academia |
last post by:
(If you've seen this in the drawing NG, sorry. I inadvertently sent it
there.)
I have a listbox populated with Objects.
The Class has a String field that ToString returns.
I assume that is what the ListBox uses for its display. Correct?
|
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: 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: 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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: 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...
|
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: 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
| |
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...
| |