|
-
Jan 29th, 2011, 09:00 PM
#1
Thread Starter
Fanatic Member
populate combobox
I am currently populating a combobox as follows:
private void PopulateHealthLevels()
{
List<clsStudentDetails> healthlevels = new List<clsStudentDetails>();
healthlevels = clsStudentAccess.GetHealthLevels();
foreach (clsStudentDetails details in healthlevels)
{
cboHealth.Items.Add(details.HealthLevelName);
}
}
Question:
This is what I have in xaml:
Name="cboHealth" SelectedIndex="{Binding Path=HealthLevelID}"
The selectedindex does not seem to be working correctly.
No matter which student I choose, the item shown is always the same.
Note that there are items populated in th ecombobox.
Thanks
Last edited by arkiboys; Jan 29th, 2011 at 09:35 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|