this.ComboBoxAdvBound.SelectedIndexChanged -= ComboBoxAdvBound_SelectedIndexChanged;
this.dataSet21.Sex_Description.Clear();
this.dataSet21.Sex_Description.Merge(newDT);
this.dataSet21.Sex_Description.AcceptChanges();
this.ComboBoxAdvBound.SelectedIndexChanged += ComboBoxAdvBound_SelectedIndexChanged; |
/// <summary>
/// Occurs before SelectedIndexChanged event is triggered.
/// </summary>
private void ComboBoxAdvBound_SelectedIndexChanging(object sender, SelectedIndexChangingArgs e)
{
if (e.NewIndex == -1)
{
MessageBox.Show("SelectedIndexChanging event is occurred");
e.Cancel = true;
}
}
/// <summary>
/// Occurs when user selects the value in ComboBoxAdv
/// </summary>
private void ComboBoxAdvBound_SelectionChangeCommitted(object sender, EventArgs e)
{
MessageBox.Show("SelectionChangeCommitted is changed");
}
/// <summary>
/// Occurs when SelectedIndex is modified in ComboBoxAdv
/// </summary>
private void ComboBoxAdvBound_SelectedIndexChanged(object sender, EventArgs e)
{
MessageBox.Show("SelectedIndexChanged event is occurred");
}
|