|
a suggestion:
Columns 3 and 4 are empty first, and then click the select button, a window pops up to select the product category. After selection, click OK, the small window closes, and the results are displayed in columns 3 and 4. You want this result, I guess you The problem is not here, but how to return the result after selecting the category, right? If so, a workaround:
1. Define the event in the pop-up selection category window:
public delegate void SelectedEventHandle (string category, string category name);
public event SelectedEventHandle Selected;
Triggered at the "OK" button in this window:
Selected ("A001", "Fruit");
this.Close ();
In the window "Select" button shown earlier (assuming the category selection window class is FormSelect):
FormSelect fs = new FormSelect ();
fs.Selected + = new Form2.SelectedEventHandle (f_Selected);
fs.show ();
Note the method f_Selected:
void f_Selected (string category, string category name)
{
// throw new Exception ("The method or operation is not implemented.");
// here you can display categories etc. into columns 3 and 4
} |
|