79323239

Date: 2025-01-02 09:10:58
Score: 1.5
Natty:
Report link

The reason why the designer cannot read your BindingSource is that you only define it in the code. If you want to complete all the operations in the designer, you need to define a BindingSource in the designer.

If you want to bind the data source directly from the designer, first of all, you need to create a new data source of the corresponding class in the designer.

1、Select “Add Project Data Source” and then chose Object

enter image description here

2、 Select the corresponding class.

enter image description here

3、After created a BindingSource, bind the data source in the designer and select the display member.

enter image description here

4、After that, you just need to load the data from your data source when the Form.Load event is triggered.

enter image description here

After running, the combobox can display the data you need to show from the user normally.

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Zhenning Zhang