Microsoft.net

This is my Blog dedicated to my work in the .NET Framework.

Tuesday, December 21, 2004

Remving an Item from the ListBox

This code is executed on a button click and used to remove the selected item from the ListBox.

private void _delFromListBox(object sender, EventArgs e)
{

for(int i=_rightListBox.Items.Count-1;i>=0;i--)
{
if(_rightListBox.Items[i].Selected)
{
_rightListBox.Items.Remove(_rightListBox.Items[i]);
}
}
Posted by azamsharp at 9:30 PM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2005 (54)
    • ►  May (13)
    • ►  April (25)
    • ►  March (10)
    • ►  February (2)
    • ►  January (4)
  • ▼  2004 (29)
    • ▼  December (11)
      • Adding attributes to the HtmlTextArea control
      • Sorting in ArrayList (Ascending and Descending Order)
      • Remving an Item from the ListBox
      • Code room on www.msdn.microsoft.com
      • String Concatenation
      • Developing Asp.net Server Controls
      • FireFox kicks IE Butt
      • Returning class object or the DataSet
      • Line breaks in the Xml file while reading the path
      • Splitting
      • Disco file code can't be generated
    • ►  November (7)
    • ►  October (5)
    • ►  September (6)

About Me

My photo
azamsharp
:)
View my complete profile
Awesome Inc. theme. Powered by Blogger.