C#C
C#3y ago
yumo

❔ Combobox add more text into data

Well my combobox is giving me the values of a table like this:


            SqlConnection con567 = new SqlConnection("mydatasourcehere");
            SqlCommand xxmd = new SqlCommand("SELECT nome_operador from Operadores", con567);
            SqlDataAdapter dat = new SqlDataAdapter();
            dat.SelectCommand = xxmd;
            DataTable table187 = new DataTable();
            dat.Fill(table187);

            DataRow itemrow78 = table187.NewRow();
            itemrow78[0] = "Selecionar Operador";
            table187.Rows.InsertAt(itemrow78, 0);

            cmbOperadores.DataSource = table187;
            cmbOperadores.DisplayMember = "nome_operador";

and this is working fine, but now i wanted to when i press that button with the arrow in it, would add to the item selected (Inativa) so it would get the text from the combobox and add (Inativa) .

Would love some help i've been trying for the past hour and couldnt get any result
image.png
Was this page helpful?