Winform form, drop down list update data issue

Updated on technology 2024-02-08
19 answers
  1. Anonymous users2024-02-05

    Write this when popping up a modal window.

    form2frm

    newform2();

    if( just refresh it here.

    Write this sentence when the second form is closed.

    To add: if form2

    frm=new

    form2 (control name).

    If you want to have arguments, you need to override the constructor of the second form.

    public

    form2(control type.

    control name 1) {

    Control name = control name 1;

    initializecomponent();

  2. Anonymous users2024-02-04

    It's best to write a separate function for the part that updates the data, such as loadcombobox() dropdown 1().

    string value = ;

    loadcombobox();Update.

    value;

    dropdown_2()

    string value = ;

    loadcombobox();Update.

    value;

  3. Anonymous users2024-02-03

    。 。Learn two departure events. 。Wouldn't it be nice to have a drop down event and start one?

  4. Anonymous users2024-02-02

    Change the loading status of the subform.

    That is, maximize the subform as soon as it loads.

  5. Anonymous users2024-02-01

    I don't understand what you mean.

  6. Anonymous users2024-01-31

    Friend: The selectedindex attribute should be set;

  7. Anonymous users2024-01-30

    You join under formload.

    selectedindex = 0;

    That's it,

  8. Anonymous users2024-01-29

    First, get the data ID and bind it to the combobox, get the currently displayed data ID in the value change event of the combobox, then query the database according to the id, and finally display it.

  9. Anonymous users2024-01-28

    I'm testing fine here.,You're having a problem.。

    It should be your combox's problem.

  10. Anonymous users2024-01-27

    I can't see the problem with this little bit, it should be a problem.

  11. Anonymous users2024-01-26

    Difference 1One can format cells, while the latter is difficult to set.

    Difference 2Usually one does not have an option icon, and the other does.

    Difference 3The latter one belongs to the object and can be moved anywhere.

    Difference 4The latter requires that the content be locked.

    Difference 5The timing and use of the use are different.

    And so on the difference 6The latter resize cells to change the size of the object.

  12. Anonymous users2024-01-25

    You need to add two columns of c and d as parameters.

    a b c d

    1 (Combo box) (Auto display**) Product **.

    2 Sofa 3000

    3 beds 2000

    4 tables 1000

    Right-click the combo box in A1, select Format Control, and enter $c$2:$c$100 in Data Source Area, and $a$1 in Cell Link.

    Enter =vlookup(a1,$c$2:$d$100,2,) in cell B1

    In this way, after selecting "sofa" in the drop-down list of the combo box in A1, ** "3000" yuan will be automatically displayed in cell B1.

  13. Anonymous users2024-01-24

    I don't understand your question, is the cell formatted as text.

    index(a1:d11,4,3)

    Shows the contents of the cell at the intersection of row 4 and column 3 (i.e., C4) in the range of cells A1 to D11.

  14. Anonymous users2024-01-23

    If you want to save the data of the two cases of "sofa" and "3000 yuan" in the two columns of the supervision, you can hide these two columns. Then in the case of b1 we use the function "lookup(parameter 123...).That's it.

    If you don't know how to use lookup in excel, go search or see help.

  15. Anonymous users2024-01-22

    First, set the modifier property of the lable control to public in the form with the lable control

    The button response function in form1 with button and textbox1 is:

    private void button1_click(object sender, eventargs e)

    After running, enter the characters in textbox1 and click the button and it's OK.

  16. Anonymous users2024-01-21

    The modifier property of the lable control in form1 is set to publicform1 for the button event.

    private void button1_click(object sender, eventargs e)

    form2.

    private void button1_click(object sender, eventargs e)

  17. Anonymous users2024-01-20

    You can customize a static variable. There is also a tag with the form. Keep it simple.

  18. Anonymous users2024-01-19

    Change|The constructor of form1 takes one argument.

    Button events can be passed to new form1.

  19. Anonymous users2024-01-18

    Add the command to the button in form2: and that's it.

Related questions
12 answers2024-02-08

option explicit statement.

Used at the module level to force all variables in the module to be explicitly declared. >>>More

10 answers2024-02-08

It's a semi-translation, because the reason for the error is already given in the dialog box. >>>More

16 answers2024-02-08

Originally, Yun Ho was standing in the middle.

But because of the short height in the middle. >>>More

11 answers2024-02-08

In C++, vector is used as a container, and its function is to store variables of struct type. Here's how vector might be used: >>>More