Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sda = new SqlDataAdapter("Select * from FamilyView",con);
- Sda.Fill(ds);
- dg.DataSource = ds.Tables[0];
- dg.Refresh();
- SqlDataAdapter sadapter = new SqlDataAdapter("Select * From SStatus", con);
- DataSet ds1 = new DataSet();
- sadapter.Fill(ds1);
- DataGridViewComboBoxCell ComboColumn = (DataGridViewComboBoxCell)(dg.Rows[i].Cells[0]);
- ComboColumn.DataSource = ds1.Tables[0];
- ComboColumn.DisplayMember = "Name";
- BindingSource StatusBD = new BindingSource();
- StatusBD.DataSource = ds1;
- DataGridViewComboBoxColumn colType = new DataGridViewComboBoxColumn();
- colType.HeaderText = "Status";
- colType.DropDownWidth = 90;
- colType.Width = 90;
- //colType.DataPropertyName = "Name";
- colType.DataSource = ds;
- colType.DisplayMember = "Name";
- colType.ValueMember = "IdStatus";
- dg.Columns.Insert(dg.Columns.GetColumnCount(DataGridViewElementStates.None) - 1, colType);
- DataGridViewComboBoxColumn colType = new DataGridViewComboBoxColumn();
- BindingSource wizardBindingSource = new BindingSource();
- wizardBindingSource.DataSource = dataSet;
- wizardBindingSource.DataMember = "protocol"; // This is the table in the set
- colType.HeaderText = "Type";
- colType.DropDownWidth = 90;
- colType.Width = 90;
- colType.DataPropertyName = "wizardProtocol";
- colType.DataSource = wizardBindingSource;
- colType.DisplayMember = "protocolName";
- colType.ValueMember = "idprotocols"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement