Combo Box Selection Changed Event get automatically fired at Page Load.
When the page loads, ComboBox Selection changed Event get automatically fired which causing unnecessory
WCF service function call.
Check out the Following Code:-
XAML:
C# Code Behind:
When the page loads, ComboBox Selection changed Event get automatically fired which causing unnecessory
WCF service function call.
Check out the Following Code:-
XAML:
<
telerikInput:RadComboBox
Width
=
"100"
Margin
=
"2"
Height
=
"20"
x:Name
=
"ddlMeasure"
SelectionChanged
=
"ddlMeasure_SelectionChanged"
HorizontalAlignment
=
"Center"
VerticalAlignment
=
"Top"
>
</
telerikInput:RadComboBox
>
public CareProviderbyDiseasePopUp()
{
busyIndicator = new BusyIndicator();
busyIndicator.Width = 300;
busyIndicator.Height = 325;
busyIndicator.HorizontalAlignment = HorizontalAlignment.Center;
busyIndicator.VerticalAlignment = VerticalAlignment.Top;
busyIndicator.Visibility = Visibility.Visible;
isLoading(true);
InitializeComponent();
intAppUserId = App.Current.Resources.Contains("AppUserId") ? Convert.ToInt32(App.Current.Resources["AppUserId"]) : 0;
intDiseaseId = App.Current.Resources.Contains("DiseaseId") ? Convert.ToInt32(App.Current.Resources["DiseaseId"]) : 0;
intMeasureId = App.Current.Resources.Contains("MeasureId") ? Convert.ToInt32(App.Current.Resources["MeasureId"]) : 0;
intTrendDiseaseID = App.Current.Resources.Contains("TrendDiseaseID") ? Convert.ToInt32(App.Current.Resources["TrendDiseaseID"]) : 0;
LayoutRoot.Children.Add(busyIndicator);
radChart.Visibility = Visibility.Collapsed;
BindChart();
// Combo Box Selection Changed Event Registered
ddlMeasure.SelectionChanged+=new Telerik.Windows.Controls.SelectionChangedEventHandler(ddlMeasure_SelectionChanged);
}