I am new to vb.net and I am using visual studio 2010. I have two comboboxes on a form, each combobox is set to DropDownList so that a list of items can show in the combobox, but no text is allowed to be entered.
For combobox A, if user chooses item 1, the list of combobox B should be updated accordingly. I think this is quite common on a lot of applications. But I do not know to implement it. I even do not know the keyword to search for the relevant property or event handler.
I'm making a combobox on a form. I want the combobox to have a list of choices from a table in a db. The two columns are a String and a Date. I want the date column to only show the year. I'm hoping I have the code right as it is above, but I'm not positive I've done the whole date thing right.
i was trying to paint a row of a listbox item but ppl said that listview item is much better than a listbox and has the ability to paint items, what i couldnt get it to work however is to add an arraylist to the listview what ive tried was the following:
datasplit.AddRange(progressload.Split(New Char() {"'"c})) Dim items As New List(Of ListViewItem) items.AddRange(datasplit.ToArray)
[code]....
Is there any easy way to add an arraylist to listview?i forget, is there a possibility to make listview order items like a listbox? i dont want from left to right then down then left to right then down... etc I want them to be top down and keep like that no matter the dimensions of the listview.
I'm having an issue with updating a couple list boxes in the form load procedure. I have an array created from a MySQL database, and when I try to add that array to more than one ListBox, I get: A first chance exception of type 'System.ArgumentNullException' occurred in System.Windows.Forms.dll
I am trying to populate an ArrayList using the elements from a DataTable. I know I could do this using Loop, but I am trying to figure out how to using AddRange.Here's my code:SomeArrayList.AddRange(SomeDataTable.Rows.Item(0).ItemArray)
The problem is that I can pass the collection except for the Zeroth element.
This is the collection I am trying to pass to the ArrayList: 1. Dog 2. Cat 3. Bird
I have this seperate class to fill a treeview from my database.There are over 33000 records and when this class runs, it takes almost 1 minute to finish.When i run this query from the server it takes for 5 seconds to retrieve all items.Is there a way to optimize this class?
Option Explicit On Option Strict On Imports System.Windows.Forms
I want to be able to add a range and get updated for the entire bulk. I also want to be able to cancel the action before it's done (i.e. collection changing besides the 'changed').
I've been trying to fix this for a while now and have yet to find a solution that works, I want it so that when an item is added another of the same name cannot be added. Here's what I have
Dim i As Integer For i = 0 To ComboBox1.Items.Count() - 1 If ComboBox1.Items.Item(i) = TextBox1.Text Then 'do nothing Else
I was useing VB a lot for some years ago and now I have started again..then, think I was useing VB3 or VB4 there was a property on ComboBox and listboxes that allows only to select the values in the Combox.. Not able to write own values..
How can i get the integer value alone from the combobox list. For examle, if the item in the combobox is "ABC 01", i want to get the value "01" alone into my code for processing. How can i do it?
I'm using VS2008, VB.Net and WinForms. I cannot get the combobox droplist to display the most recently added item unless I quit the app and restart. I've searched thru several forums for answers but cannot get any to work for me
Private Sub cboSpecialty1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboSpecialty1.KeyDown Dim objCommand As SqlCommand = New SqlCommand
I am trying to make it so when i choose a item in the combo box the list box is cleared i have tried these two codes and i cannot thing of any others but it does not work can someone help me? [Code]
This is my first post so be gentle . I have tried to create form with combo. Combo has source in Access database. What I want is for combo to check user input, if not in list, prompt "Add new item to source table" and if "Yes" add new item (row) to source table. I have been working in Access and this is new t
I am absolate new to vb.net .can some one help me to write a query that will display list of tables in combobox.using the code bellow i can create table but i want to be able to add all the avilable table names in combobox.Imports System.Data.OleDb Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Cmd As OleDbCommand Dim SQL As String Dim objCmd As New OleDbCommand
Is using Public Property the best way to achieve the following.From a drop down combobox, a list of options are available. Each option in the combobox has a number of public properties that need to be associated with it.When a option is selected, the user will then have two buttons that each call a different sub, the appropriate options are passed to the sub.Each option will always have the same properties required to be passed.So I'm looking at something like this.
Public Class Parameters Public Property server As String Public Property replica As String Public Propery path As String End Class
I am a beginner designer in vb.net,, I have designed a simple form,, added a menu with add, update, and delete the records,,In the "delete" form,, I have added a combobox to list the records "StuID" from database,, it is successfully showing,, my query is when building the form the combobox appears empty unless you dragdown the list,, I want that the first record to be displayed directly so that the user knows that there are records in the conbo box,
I have created a drop-down list box that holds 8 numbers representing a month span (3, 6, 9, 12, 15, 18, 21, 25 months). In order to prevent users from typing just anything into the text box above the combo box, I changed it to a drop-down listbox. The other requirement that I was hoping to implement was for the user to be able to type a number, after which the selection would jump to the appropriate item (i.e. the user types in '1', and the selection jumps to 12). This partially works. It will jump to 12, for example, but immediately after the user types the '1', the Selected Index event changes. The user cannot scroll down or up after typing in a number.
I want to populate my combobox with the list of banknames available in my database.. I tried doing so but I am getting a blank list. i.e.. shows no value in combobox!
Here is what I tried... Private Sub ComboBox4_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox4.SelectedIndexChanged Try 'MsgBox("Open") cn = New OleDbConnection("Provider=microsoft.jet.oledb.4.0;Data Source=E:\Project-Hemtech\HemDatabase1.mdb;") [Code] .....
I want to populate a Combo Box with a list of names and from that have the contact information (address, phone, email, ect..) populate a series of textboxes. The list is roughly 20 names, but it could grow to a hundred or more. Since the contact information changes periodically, I would like a very easy way to maintain it (Excel or Access).
Update: I am just trying to understand whether I should use Linq (have to learn it) or is there some other way this should be done.
problem with my code is that have a list and now need to read that list to 3different list as a title, total cost, currenlty tagged item? this is my code I have made so far:
Public Class Form1 Dim decSubTotal As Decimal Public g_selected As String Public m_Name() As String = {"Black Howk Down" & "Fear and Loafing" & "Fight"}