I want to cancel the value changed Event based on certain condition.
If i choose value from the dropdown, then it is ok. But if i type value in the dropdown, then that message comes twice.
What can i do for this? Is any otherway to handle this scenario?
UltraCombo Property:
Event Fired:
Sample Code
private void ifgCboTest_ValueChanged(object sender, EventArgs e)
{
try
Cursor =
if (_isFromValueChanged)
return;
if (ifgCboTest.SelectedRow != null )
UltraGridRow ugRow = ifgCboTest.SelectedRow;
if (ugRow.Cells["Desc"] != null && ugRow.Cells["Desc"].Value != DBNull.Value && !string.IsNullOrEmpty(ugRow.Cells["Desc"].Text.Trim())) if (!string.IsNullOrEmpty(ifgtxtNotes.Text.Trim()))
DialogResult dlg_Result = MessageBox.ShowMessageBoxYesNo(Resources.Messages.TestDetail, "Continue.It will overwrite existing description", global::Utils.MessageBoxExLib.MessageBoxExIcon.Question);
if (dlg_Result == DialogResult.No) true;
_isFromValueChanged =
//ifgCboTest.SelectedRow = null;
if (_oldID > 0)
Utils.SetValueForCombo(_oldID, ifgCboTest);
else
ifgCboTest.SelectedRow = null;
}
//TODO }catch (Exception exifgCboTest_ValueChanged)
finally
if (!_isFromValueChanged)
if (ifgCboTest.SelectedRow != null) Convert.ToInt32(ifgCboTest.Value);
_oldID =
_oldID = 0;
I am having trouble validating the change for UltraCombo droplist. My ValueChange event happens and the validaing event does not get called. Am i doing something wrong. I basically want to add a message before the change and if the uses says cancel... no change to the dropdown. Can you help!
Thanks Von
I also ensured that the cmbManPaymentItemType.CasuesValidation is set to true. Also i am binding to a datatable.