<dxe:TextEdit Name="txtSearchPatientName" KeyDown="txtSearchPatientName_KeyDown_1"/>
private void txtSearchPatientName_KeyDown_1(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { string searchStr = txtSearchPatientName.EditValue as string; if (searchStr != null) { SearchPatientDemographics(searchStr); } else { GUtil.ShowErrorMessageBox("ResSearchError"); } } }