Click here to Skip to main content
15,887,946 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: C# Client Server Application on WPF IDE Pin
Abhinav S4-Feb-11 5:12
Abhinav S4-Feb-11 5:12 
QuestionSilverlight Hierarchical template for Multiple Types in Treeview Pin
www.Developerof.NET3-Feb-11 23:47
www.Developerof.NET3-Feb-11 23:47 
AnswerRe: Silverlight Hierarchical template for Multiple Types in Treeview Pin
Mycroft Holmes7-Feb-11 19:44
professionalMycroft Holmes7-Feb-11 19:44 
Questionbind combobbox [modified] Pin
arkiboys3-Feb-11 23:40
arkiboys3-Feb-11 23:40 
AnswerRe: bind combobbox Pin
Pete O'Hanlon3-Feb-11 23:44
mvePete O'Hanlon3-Feb-11 23:44 
Questionpopulate combobox with names and ids Pin
arkiboys3-Feb-11 12:05
arkiboys3-Feb-11 12:05 
AnswerRe: populate combobox with names and ids Pin
_Maxxx_3-Feb-11 14:47
professional_Maxxx_3-Feb-11 14:47 
GeneralRe: populate combobox with names and ids Pin
arkiboys3-Feb-11 22:44
arkiboys3-Feb-11 22:44 
I have now included the real sample of what I am trying to do...
You see that first I am retrieving data from a stored procedure which then correctly gets populated into a listcollection called grades.

First problem is that the combo box does not get populated.
Note that I can see there is correct data in cboGrades.ItemsSource
Do you see what I am doing wrong please?
Thanks

public static List<clsStudentDetails> GetGrades()
        {
            DbCommand comm = clsGenericDataAccess.CreateCommand();
            comm.CommandText = "uspGetGrades";
            DataTable table = new DataTable();
            table = clsGenericDataAccess.ExecuteSelectCommand(comm);
            List<clsStudentDetails> grades = new List<clsStudentDetails>();
            for (int i = 0; i < table.Rows.Count; i++)
            {
                clsStudentDetails details = new clsStudentDetails();
                details.GradeID = int.Parse(table.Rows[i]["GradeID"].ToString());
                details.GradeName = table.Rows[i]["GradeName"].ToString();

                grades.Add(details);
            }
            return grades;
        }
---------------------
private void PopulateGrades()
        {
            List<clsStudentDetails> studentDetails = new List<clsStudentDetails>();
            cboGrades.ItemsSource = clsStudentAccess.GetGrades();
        }

---------------------
<ComboBox Name="cboGrades" DisplayMemberPath="GradeName" 
          SelectedValuePath="GradeID"
          Width="208" />

GeneralRe: populate combobox with names and ids Pin
_Maxxx_6-Feb-11 16:27
professional_Maxxx_6-Feb-11 16:27 
QuestionAn MVVM way to know when a database update is complete in order to navigate to another page. Pin
ToddHileHoffer3-Feb-11 10:09
ToddHileHoffer3-Feb-11 10:09 
AnswerRe: An MVVM way to know when a database update is complete in order to navigate to another page. Pin
Pete O'Hanlon3-Feb-11 11:45
mvePete O'Hanlon3-Feb-11 11:45 
AnswerRe: An MVVM way to know when a database update is complete in order to navigate to another page. Pin
_Maxxx_3-Feb-11 14:32
professional_Maxxx_3-Feb-11 14:32 
AnswerRe: An MVVM way to know when a database update is complete in order to navigate to another page. Pin
Abhinav S3-Feb-11 21:33
Abhinav S3-Feb-11 21:33 
GeneralRe: An MVVM way to know when a database update is complete in order to navigate to another page. Pin
ToddHileHoffer4-Feb-11 2:33
ToddHileHoffer4-Feb-11 2:33 
GeneralRe: An MVVM way to know when a database update is complete in order to navigate to another page. Pin
Abhinav S7-Feb-11 19:14
Abhinav S7-Feb-11 19:14 
AnswerRe: An MVVM way to know when a database update is complete in order to navigate to another page. Pin
Mycroft Holmes7-Feb-11 19:28
professionalMycroft Holmes7-Feb-11 19:28 
QuestionAdd Controls Dynamically Using MVVM Pin
Kevin Marois3-Feb-11 8:20
professionalKevin Marois3-Feb-11 8:20 
AnswerRe: Add Controls Dynamically Using MVVM Pin
dasblinkenlight3-Feb-11 8:50
dasblinkenlight3-Feb-11 8:50 
GeneralRe: Add Controls Dynamically Using MVVM Pin
Kevin Marois3-Feb-11 9:04
professionalKevin Marois3-Feb-11 9:04 
AnswerRe: Add Controls Dynamically Using MVVM Pin
RobCroll3-Feb-11 13:37
RobCroll3-Feb-11 13:37 
AnswerRe: Add Controls Dynamically Using MVVM Pin
_Maxxx_3-Feb-11 15:31
professional_Maxxx_3-Feb-11 15:31 
AnswerRe: Add Controls Dynamically Using MVVM Pin
_Maxxx_3-Feb-11 15:54
professional_Maxxx_3-Feb-11 15:54 
QuestionHelp editing Xml file from code - C# Pin
jadughar3-Feb-11 5:46
jadughar3-Feb-11 5:46 
AnswerRe: Help editing Xml file from code - C# Pin
Pete O'Hanlon3-Feb-11 8:03
mvePete O'Hanlon3-Feb-11 8:03 
AnswerRe: Help editing Xml file from code - C# Pin
RobCroll3-Feb-11 13:54
RobCroll3-Feb-11 13:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.