We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

C# ComboBox selected item clear

Last post 05-06-2008 1:13 PM by murali4mms. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-05-2008 8:00 AM

    • tagaPardo
    • Not Ranked
    • Joined on 04-05-2008
    • Philippines
    • New Member
    • Points 30

    C# ComboBox selected item clear

    Hi,

    How do i clear a combo box that has text already selected/displayed considering

    DropDownStyle was set to DropdownList.

    This is basically clearing the display and not the  items.

     

     

    • Post Points: 15
  • 04-10-2008 12:48 AM In reply to

    • oddian
    • Not Ranked
    • Joined on 04-09-2008
    • Australia
    • New Member
    • Points 30

    Re: C# ComboBox selected item clear

    I imagine you've already found the solution to your problem, but the simplest way I know of is to set the SelectedItemIndex to -1 of set the Text property to "".

     Cheers

    Daniel
     

    • Post Points: 15
  • 04-10-2008 5:05 AM In reply to

    • cobol
    • Not Ranked
    • Joined on 02-14-2008
    • Israel
    • New Member
    • Points 70

    Re: C# ComboBox selected item clear

    my message

    fragment:

    int c1*a1+c2*a2+c3*a3->max

    a1=0;

    a2=2*a3;

    a3=10;

    a3<=b3

    txt1.text=max.tostring();

    • Post Points: 5
  • 04-15-2008 3:13 AM In reply to

    • tagaPardo
    • Not Ranked
    • Joined on 04-05-2008
    • Philippines
    • New Member
    • Points 30

    Re: C# ComboBox selected item clear

    thanks Daniel,

    In VS2005 I could not find SelectedItemIndex, instead i tried SelcetedIndex and set it to -1 and

    it works. Thank you.

    Elmer

    • Post Points: 10
  • 04-18-2008 9:53 AM In reply to

    • cobol
    • Not Ranked
    • Joined on 02-14-2008
    • Israel
    • New Member
    • Points 70

    Re: C# ComboBox selected item clear

    int a,b;

    bool d1,d2;

    a=5;b=7;

    if(a>b)

    d1=true;

    else

    d2=false;

    print(d1,d2);

    end;

    • Post Points: 5
  • 05-06-2008 1:13 PM In reply to

    Re: C# ComboBox selected item clear

    ComboBox.SelectedIndex = -1;

    • Post Points: 5
Page 1 of 1 (6 items)