This is a migrated thread and some comments may be shown as answers.

Combo Box Selection Changed Event get automatically fired at Page Load.

1 Answer 167 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 2
Rahul asked on 26 Jul 2011, 04:17 PM
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:
<telerikInput:RadComboBox  Width="100"  Margin="2"  Height="20" x:Name="ddlMeasure"  SelectionChanged="ddlMeasure_SelectionChanged"  HorizontalAlignment="Center" VerticalAlignment="Top" >
 </telerikInput:RadComboBox>
C# Code Behind:
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);
       }

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 28 Jul 2011, 08:59 AM
Hello Rahul,

We've tested the provided code but weren't able to reproduce the described issue. Could you please send us more details which will help us observe the problem? Thanks in advance

Greetings,
Yana
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
ComboBox
Asked by
Rahul
Top achievements
Rank 2
Answers by
Yana
Telerik team
Share this question
or