Set value of winworm combobox linked to a datatable

0

Good morning

How can I set a value to a combobox that is linked to a datatable:

Ex:

MiComboBoc.SelectedValue="01"

    
asked by Luis Mata 16.10.2017 в 21:47
source

1 answer

0

This was the solution:

foreach (ComboboxItem cbi in CBAlmacenes.Items)
                        {
                            if (cbi.Value as String == row["CodAlmacen"].ToString())
                            {
                                CBAlmacenes.SelectedItem = cbi;
                                break;
                            }
                        }
    
answered by 16.10.2017 в 22:13