473,725 Members | 2,243 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refreshing a listbox bound to a dataset

I am fairly new to VB.NET and I am having some difficulty working with a
bound listbox.

On a simple form, I open a connection to my database and load a dataser. I
then bind a listbox to the the dataset and set the display member. I also
connect some filed using databinding.

I am able to choose an item from the listbox and edit it, but the listbox is
not refreshing (only the original values are visible in the listbox). If I
choose a different value form the listbox, the values in the textboxs are
correct. And if I select the previously edited value again in the listbox,
the textbox will show the new 'edited' value, but the listbox still displays
the old value.

Am I missing something? Shouldn't the lsitbox automatically refresh (like a
datagrid)?

Any help would be greatly appreciated.

Thank you
Tony
Nov 22 '05 #1
0 1290

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

Similar topics

0
867
by: Pete Davis | last post by:
I have a collection derived from CollectionBase. I am setting the DataSource of my ListBox to the collection. That all works. I have two problems: The code just after the call to InitializeComponent() looks like this: shareListBox.DisplayMember = "Filename"; shareListBox.DataSource = shares; shareListBox.ClearSelected(); 'shares' is my collection.
0
1221
by: Alpha | last post by:
Hi, I have a listbox and a textbox which is bind to the same dataset's column. So the selected item is display in the textbox availbe for editing. When I change the text in the textbox it has several problems: 1. It doesn't save the changes in the textbox to the database when I immediately click the OK button. It does save the changes if I click on a different item in the list box first. 2. The listbox doesn't reflect the new changes in...
3
33721
by: Lasse Edsvik | last post by:
Hello I've created a class that has a method that returns a dataset like this: public DataSet GetAllCustomers() { Open();
0
847
by: Joseph Ashizawa | last post by:
I'm trying to refresh a checked list box after adding an item to an ArrayList bound to it. I'm using Visual C++ Express Beta. I've browsed the web for solutions for this problem that worked before such as: ---------- System::Windows::Forms::CheckedListBox^ checkedListBox1; System::Collections::ArrayList^ ArrayList1;
6
2232
by: Young J. Putt | last post by:
I've got a list box bound to a Datatable, like this: lstProjects.DataSource = m_oProjectSet.DataTable lstProjects.DisplayMember = "ProjectDesc" lstProjects.ValueMember = "ProjectID" I want to pass the ProjectID value (integer) of the selected item in lstProjects to another function. I assumed I could reference the integer value of the ProjectID column as
3
1199
by: BrianDH | last post by:
Is there a way to load into a listbox.. one click at a time... one row at a time... both a value & display text without using a bound Dataset? ValueID = 123 DisText = "Bob" Private Sub btnSplitAdd_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles btnSplitAdd.Click lbSplitBrkFee.BeginUpdate() lbSplitBrkFee.Items.Add(ValueID, DisText)
0
1687
by: Dave | last post by:
Hi all, I have a listbox that is complex bound by an arraylist. The problem is that when I delete an object from the arraylist, the listbox does not reflect those changes. I tried refreshing the listbox with no luck and, because it is already bound, I can't just delete the item directly from the listbox without an error (because it already has a datasource, you are not allowed to delete/add anything to the listbox directly). The...
2
1792
by: anniebai | last post by:
I don't know if I can explain my question clearly. There're three tables as Scholars, Grants, ScholarWIthGrants, the relationship between scholar and grants is 'many-to-many', and ScholarWithGrants is the joint table. A scholar form is created, as main form. a listbox as 'grantList' is embedded into this main form. The data source for grantlist is bound to the scholarID on the main form. SELECT sg.ScholarID, sg.GrantID, sg.Title,...
6
3516
by: sartemieff | last post by:
I am using MS Access 2007 on an XP platform. I have forms (split and single) with listboxes. If a listbox is bound to a field that can contain a null, I would like the listbox to include a blank entry at the top of the list so it is readily apparent when the bound field contains a null and so that the user can deselect a value and revert to a null value. I would also like the listbox to display the entry that corresponds to the value of the...
0
8752
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
9401
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
9257
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...
0
8099
agi2029
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...
1
6702
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
6011
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();...
0
4519
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
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3228
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 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.