Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Visual Studio Express: Delete data in a combobox

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 29-12-2010
Member
 
Join Date: Sep 2010
Posts: 16
Visual Studio Express: Delete data in a combobox
  

Hello how do I delete what is written in a combobox when in DropDownList.? When the DropDown is used combobox.text = "" as serious DropDownList is the same way or is another.? I am not that expert in Visual Studio Express, so thought to take some help from you members. I have also tried many different methods to do it, but I was not successful. I am able to delete the entries from simple options, but not in the combo-box. Please help me by providing some proper solutions. Any other information related to the subject would also be grateful.

Reply With Quote
  #2  
Old 29-12-2010
Member
 
Join Date: Apr 2008
Posts: 193
Re: Visual Studio Express: Delete data in a combobox

Hello as I erase the writing in a combobox when in DropDownList. When the DropDown is used combobox.text = "" as serious DropDownList is the same way or is another. Well the closest thing you could use the Clear method I explain how to use.. For a DropDowList can use the following:
Code:
this.DropDownList1.Items.Clear ();
I hope that you will definitely get the help that you were looking for.
Reply With Quote
  #3  
Old 29-12-2010
Member
 
Join Date: Oct 2008
Posts: 167
Re: Visual Studio Express: Delete data in a combobox

It really depends on whether the data bound this control or not. But for this out there need to preserve the original dataset in Session, so look for the item and delete it. If you've added in code, or the Items.Add () would remove directory:
Code:
DropDownList1.Remove (DropDownlist1.SeletedItem) 

or else 

DropDownList1.RemoveAt (DropDownlist1.SeletedIndex)
Utilize the remove method to eliminate a ListItem from the collection. Implementation of the method this takes the ListItem Specified by the item parameter and detached it from the collection.
Reply With Quote
  #4  
Old 29-12-2010
Member
 
Join Date: Mar 2008
Posts: 227
Re: Visual Studio Express: Delete data in a combobox

I am providing an example for ListItemCollection. Remove Method (ListItem) that is used in VB. I am sure that you will get some hint from it. The following exhibit the code illustration creating ListItemCollection objects, toting up items to the collections, and removing items from the anthologies. In the example, the ListItemCollection named listBoxData is bought into play as the data source for a ListBox control ListBox1 Called, and the ListItemCollection Called ddBoxData is used as the data source for a DropDownList control called DropDownList1.
Code:
'Add the selected item to DropDownList1.
 DropDownListA.Items.Add (ListBoxA.SelectedItem)
 'Delete the selected item from ListBoxA.
 ListBoxA.Items.Remove (ListBoxA.SelectedItem)
Reply With Quote
  #5  
Old 29-12-2010
Member
 
Join Date: Jan 2009
Posts: 140
Re: Visual Studio Express: Delete data in a combobox

There are two ways to do that are :
  • Static
  • Dynamic
Static: is that the values are listed, the project will not change.
Dynamics: is values that are listed, the project varies. An Example of Static:
It may be that you fill out a cambox an Array List <> or Manuel and Dynamic: when the cambox is filled with a field of database.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Visual Studio Express: Delete data in a combobox"
Thread Thread Starter Forum Replies Last Post
Visual Studio 2010: features and changes compared to Visual Studio 2008 BinDs14 Guides & Tutorials 2 16-02-2011 02:49 PM
error in Data Source Configuration Wizard in Visual Studio 2008 BlackRedRobin Software Development 2 31-05-2010 11:29 AM
Compare Visual Studio 2010 and Visual Web Developer Express Zacharia Software Development 5 28-01-2010 04:27 AM
System.Data.DataRowView in combobox ArunJ Software Development 4 01-10-2009 09:21 PM
Difference between Visual studio 2005 and Visual studio 2008 RohanS Software Development 3 12-06-2009 10:48 AM


All times are GMT +5.5. The time now is 11:03 PM.