Advertisement
Advertisement
| 07.15.2008 at 12:33PM PDT, ID: 23567322 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: |
dg_suspect_information.DataSource = FIMSDBOperations.GetSuspects().Tables["tbl_suspects"].DefaultView;
DataGridTableStyle ts = new DataGridTableStyle();
ts.MappingName = "tbl_suspects";
ts.RowHeadersVisible = false;
dg_suspect_information.TableStyles.Add(ts);
//This is the column I want to add a combobox too.
ts.GridColumnStyles["arrest_made"].MappingName="arrest_made";
ts.GridColumnStyles["arrest_made"].HeaderText="Arrest made";
ts.GridColumnStyles["arrest_made"].Width = 100;
//attempting to add combobox to field above. Doesn't work.
DataGridComboBoxColumn ComboTextCol = new DataGridComboBoxColumn();
ComboTextCol.myComboBox.DisplayMember = "arrest_made";
ComboTextCol.myComboBox.ValueMember = "arrest_made";
ComboTextCol.myComboBox.Items.Add("No");
ComboTextCol.myComboBox.Items.Add("Yes");
ComboTextCol.myComboBox.Text = ts.GridColumnStyles["arrest_made"].ToString();
|