<xctk:checkcombobox height="20" name="LocaleSelector" Margin="226,12,26,429" ItemSelectionChanged="LocaleSelector_ItemSelectionChanged"> </xctk:checkcombobox>
public void BindComboBox() { try { SqlConnection conn = new SqlConnection(str); SqlDataAdapter da = new SqlDataAdapter("select Department_Name from Dept", conn); DataSet ds = new DataSet(); da.Fill(ds, "dept"); Selector sel = new Selector(); LocaleSelector.Items.Add("All"); if (ds.Tables["dept"].Rows.Count > 0) { foreach (DataRow dr in ds.Tables["dept"].Rows) { LocaleSelector.Items.Add(dr["Department_Name"]); } } } catch (Exception ex) { throw ex; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)