Good Evening
I have a Datagrid and i selectedChange event of the Datagrid, i show a child wind and i bind the textbox controls of the child window from the Parent Window which has a datagrid. Now my problem is that there is a Combobox on the Child window, onbviously this combobox is binded after the child window has opened. The data is not Static , its coming from the DB. What i want is to set the selected item from the parent. This is what i am doing
Code:
private void grdkids_SelectionChanged(object sender, Telerik.Windows.Controls.SelectionChangeEventArgs e)
{
//kid
KidsViewUpdateDetails KidsDetails = new KidsViewUpdateDetails();
KidsModelExtended model = (KidsModelExtended)this.grdkids.SelectedItem;
KidsDetails.txtstudentnumber.Text = model.sStudentNumber;
KidsDetails.txtkidname.Text = model.sKidName;
KidsDetails.txtkidlastname.Text = model.sKidLastname;
KidsDetails.txtgrade.Text = model.sKidGrade;
KidsDetails.txtclass.Text = model.skidclass;
KidsDetails.ddlallergies.Text = model.sAllergyName;
KidsDetails.ddlschool.Text = model.sSchoolName;
GenericMethods.GenericMethods.SetCookie("kidId", model.iKidid.ToString());
KidsDetails.Show();
}
in this lines
Code:
KidsDetails.ddlallergies.Text = model.sAllergyName;
KidsDetails.ddlschool.Text = model.sSchoolName;
i am trying set the selected item to be that. but when the Child load , there Combobox remain unselected
This is the declaration of the Combobox
Code:
<telerik:RadComboBox HorizontalAlignment="Left" DisplayMemberPath="sAllergyName" SelectedValuePath="{Binding iAllergyID}" Margin="106,226,0,0" Name="ddlallergies" VerticalAlignment="Top" Width="142" Height="22">
Thanks