473,799 Members | 3,442 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to modify Combobox during runtime

4 New Member
Hello I would like to get some ideas on how to modify a Combobox during runtime and save the changes so next time the form is ran changes are available.

Here is the plan.
A form displays a combobox that get populated with several items.
Next to the combobox I will add three buttons: Add, Delete and Modify.

My idea is that the combobox will read a previously created file with the items of the list.
And each button will modify that same file in order to be abel to manipulate the combobox.

Do you have any ideas on what kind of db file i should use that gives me a simple solution?
Are there particular tips or tweaks I should know about?

Thanks. Hope to hear from you soon.
Oct 23 '08 #1
2 2285
smartchap
236 New Member
Dear
You can do this. In the add button write code for input of data and then write / append that data in the file. Clear data in combobox and refill it from data from the file (amended).
In delete button write code for deleting the itemnumber selected in the combo and modify the file and refill combo.
Similarly for Modify button write code for modifying the item selected (index may be used) and replace this with old data at that index. Then modify the file.
Oct 23 '08 #2
debasisdas
8,127 Recognized Expert Expert
that can be achieved by using a database. You can read and write to the combo at runtime and the changes are saved to the database.
Oct 23 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3017
by: Saso Zagoranski | last post by:
I posted a similar message before but perhaps I didn't explain enough what the problem is... I add items to the combobox during runtime depending on what the user types... the problem is that everytime the user types something (and I add items to the combobox) the cursor is moved to the left side of the combobox, like this: |a |ba
1
10213
by: newbie | last post by:
Hello, I am using a propertygrid to allow users to edit\create objects at runtime, that can update records in a database. There are certain properties (fields) that I wish to display as comboboxs. Currently I can create an enum, which the propertygrid displays as a combobox. However since the comboxbox needs to be populated from a database query, hardcoded enum's won't work. Is there a means with which to create or define an enum at...
0
2668
by: Hiroyuki Tanaka | last post by:
Hi All, I am trying to develop an application for a touch screen using buttons for the numeric pad with Completion ComboBoxes. At the moment I am having a problem sending the button presses to my Completion ComboBox using sendkey.wait. From the keyboard (that will not exist for my final application) I can enter text into my Completion and the selection completes as expected.
2
2929
by: S.Sigal | last post by:
Hello: I've seen code in some books for databinding that handles attaching Attributes to Properties during runtime...which is very close (but no cigar) to what I am looking for... The code in the book was basically the following: override protected void PreFilterProperties(IDictionary properties) {
2
2517
by: Mark Jerde | last post by:
I'm not finding help in Google. VS .NET 2003. I have a user control with a ComboBox. At runtime the ComboBox gets loaded with a long list of strings. Since I have up to 40 controls on a form I'm trying to figure out a way for all 40 combobox controls to share the same list of items. The ComboBox.Items property is read only so setting all 40 to the same ObjectCollection won't work.
2
1791
by: SKarnis | last post by:
We are trying to rebuild a current Access 2002 (XP) mdb program to VB.NET with a SQL database - we are having problems with a suitable combobox. There are many threads discussing multiple column comboboxes in .NET. We are having success with the multiple columns similar to the combobox from Access 2002 (XP). Our biggest problem is speed. In a form in Access 2002, our combobox is able to load data in a table in separate Access database...
8
26439
by: | last post by:
I am sure this has been asked and answered, but here goes anyway... VS.Net 2005, VB.Net How can you display more than one field in the displaymember property of a combobox inside the datagridview control? I am at a loss. Thanks, David
3
5865
by: roucha | last post by:
Hey guys, i'm still working on that chat program, and i was wondering if there was a way to modify the name of already created nodes during runtime. i know that you can create them but i don't know how to edit the name of created ones. thanks.
3
17257
by: Simon van Beek | last post by:
Dear reader, What can be wrong in my ComboBox, the property "Auto Expand" is set to Yes, but by typing in the ComboBox it doesn't expand. Is this because the source of the ComboBox is a query.
0
9688
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
9544
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,...
1
10238
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
9077
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
6809
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
5467
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
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2941
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.