Home > Net >  The small white ask a question
The small white ask a question

Time:11-11


Excuse me, ladies and gentlemen, I want to open the software will be displayed after please select, comboBox1. SelectedIndex=0; Why do you wrong!

CodePudding user response:

No you don't have to, have to do is change the form, such as. The text="please select";

CodePudding user response:

To set up a dropdownlist to use?

CodePudding user response:

ComboBox1. SelectedIndex=0;

And use it every time you make sure you have the bound data source, and you please select the data source index 0

CodePudding user response:

refer to the second floor by_ love reply:
to set the dropdownlist to use?

is watching spot bamboo I came in this picture, it's a pity that CSDN into this ghost appearance, not what it once was

CodePudding user response:

The
refer to the original poster weixin_43669653 response:

Excuse me, ladies and gentlemen, I want to open the software will be displayed after please select, comboBox1. SelectedIndex=0; Why do you wrong!

Data binding, 0 index is not blank?

How this change revision so ugly, have no language

CodePudding user response:

It is written in the following way?
 
ComboBox1. SelectedIndex=0;
ComboBox1. Items. The Add (" select ");
ComboBox1. Items. The Add (" guangdong ");
ComboBox1. Items. The Add (" shenzhen ");
ComboBox1. Items. The Add (" hunan ");

If it is should have the
 comboBox1. SelectedIndex=0; 
on adding options last line,

CodePudding user response:

Add item, and then set is selected, then the SelectedIndex=0, can also. SelectedItem="please select";

CodePudding user response:

CodePudding user response:

The
refer to the original poster weixin_43669653 response:

Excuse me, ladies and gentlemen, I want to open the software will be displayed after please select, comboBox1. SelectedIndex=0; Why do you wrong!


Do you want to put the comboBox1. SelectedIndex=0; Under the data binding,
  •  Tags:  
  • C#
  • Related