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

Home Posts Topics Members FAQ

Refreshing ListBox

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::Checke dListBox^ checkedListBox1 ;
System::Collect ions::ArrayList ^ ArrayList1;

....

this->checkedListBox 1 = gcnew
System::Windows ::Forms::Checke dListBox();

this->ArrayList1 = gcnew System::Collect ions::ArrayList ();
....

ArrayList->Add("foo");

....

checkedListBox1->Datasource = NULL;
checkedListBox1->Datasource = ArrayList1;

----------

This no longer works. I have also tried using
CurrencyManager , but I get blank lines or artifacts in
between lines. Any ideas?
Nov 17 '05 #1
0 846

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

Similar topics

2
1576
by: Tim Graichen | last post by:
Hi, I have an unbound listbox in my main form that is used for reference only. If I want to add a record to the table that this list box displays, I open a seperate form to enter a new record to the table. What I would like, is for the list box in the main form to refresh after the new record is saved. Currently, I need to close and reopen the main form that contains the listbox in order to see the new record.
3
9424
by: gdbjohnson-AT-yahoo-dot-ca-nospamplz | last post by:
I have a ListBox built of a simple custom object for the ListItems used to be able to hold a Data Value, and a Display Value, with accessors for each. I have overridden the ToString method to display the Display value. (Two examples that I have seen, including an MS example, suggest that the DisplayMember and ValueMember properties of the ListBox can be used in this way, I could not get it to work using the ListItems.Add method -...
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...
0
1290
by: Tony Botelho | last post by:
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...
0
987
by: TWACSIng | last post by:
All, I have a DataGrid that when I scroll down it does not refresh and the lines get all messed up, I need to capture the scroll events in the listbox. I am using C# and winforms. Any ideas how to capture the scroll events? Bryan
7
2303
by: Cyrax1033 | last post by:
I have a database that is fully operational (thanks to everyone's help) now I'm doing some housekeeping. What I'm wanting to change is one query function; I have a form that performs a search based off criteria and uses VBA to generate an SQL string which is then passed to a listbox as its rowsource (nice summary of returned results). The user then presses a command button that exports the results to a report--when the button is pressed I did...
5
2201
by: JJ | last post by:
I want to have two lists (may have to be listboxes) on a page that are populated from a database. I then need to be able to click on an entry in one box and add it to the other, _preferably_ without refreshing the page. Is this possible? Am I coming across another reason to venture into AJAX I wonder.... What controls should I use for the lists to allow selection, sorting, etc
6
3960
by: Zytan | last post by:
In win32 there was a way to 'turn off' a listbox from updating until you were done adding elements. Is there a way to do this in .NET? Zytan
1
2518
by: sweetiecakes | last post by:
Hi I have a ListBox which is binded to a dataSet. When I need to refresh this dataSet, it works, but the old entries don't get removed from the listbox. Items.Clear() doesn't work when a DataSource is set. How would I clear all the items from the ListBox before refreshing the dataset? thanks
10
6106
by: Dan2kx | last post by:
hello, i have a quick question, is there anyway to speed up a listbox refreshing, its quite large with 18 columns and so far upto 30 rows, but it updates row by row every time the screen changes (ie ALT+TAB) (new PC isnt an option sadly) Dan
0
8888
marktang
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...
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...
1
9176
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,...
0
8097
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...
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?
3
2157
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.