0
Reply

how to have listbox display all columns in a table

blusk06

blusk06

Jun 22 2004 4:16 PM
1.5k
i have a listbox that has a list of all tables in a database. when i click on a certain table name, i want it to populate another listbox with all the column names in there. i know I need to do something with the indicated line down there at the bottom. how do i handle the event of clicking the individual table names, and how do i get it to draw out all of the column names from a datatable? // tablesBox this.tablesBox.CheckOnClick = true; this.tablesBox.Items.AddRange(new object[] { "Component", "Contracts", "Features", "Invoice", "License", "Media", "Platform", "Products", "Restrictions", "Vendor Information"}); this.tablesBox.Location = new System.Drawing.Point(16, 64); this.tablesBox.Name = "tablesBox"; this.tablesBox.Size = new System.Drawing.Size(152, 244); this.tablesBox.Sorted = true; this.tablesBox.TabIndex = 0; this.tablesBox.ThreeDCheckBoxes = true; ---->>>> this.tablesBox.ItemCheck += new ItemCheckEventHandler(........