P
Peted
So i have this code
private void PopulateProblemPage()
{
List<ListItem> problemPageList = new List<ListItem>();
foreach (PCSProblemPageType problem in
_billingEventData.ProblemPageList)
{
ListItem problemItem = new
ListItem(problem.ID.ToString(), problem.DisplayTerm, null);
problemPageList.Add(problemItem);
}
cboProblemPage.DataSource = problemPageList;
}
where the combobox cboProblemPage is populated with a list.
im having trouble, with how do i use the combobox.SelectedItem
property to make a specific item in the list the currently selected
one in the combobox
should this not work
ListItem probToMakeCurrent = new ListItem(problem.ID.ToString(),
problem.DisplayTerm, null);
cboProblemPage.SelectedItem = probToMakeCurrent ;
assuming probToMakeCurrent matches an item in the list assigned to
the combobox, is this not the way to do it ?
any advice appreciiated
Peted
private void PopulateProblemPage()
{
List<ListItem> problemPageList = new List<ListItem>();
foreach (PCSProblemPageType problem in
_billingEventData.ProblemPageList)
{
ListItem problemItem = new
ListItem(problem.ID.ToString(), problem.DisplayTerm, null);
problemPageList.Add(problemItem);
}
cboProblemPage.DataSource = problemPageList;
}
where the combobox cboProblemPage is populated with a list.
im having trouble, with how do i use the combobox.SelectedItem
property to make a specific item in the list the currently selected
one in the combobox
should this not work
ListItem probToMakeCurrent = new ListItem(problem.ID.ToString(),
problem.DisplayTerm, null);
cboProblemPage.SelectedItem = probToMakeCurrent ;
assuming probToMakeCurrent matches an item in the list assigned to
the combobox, is this not the way to do it ?
any advice appreciiated
Peted