Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi i am getting error on populating TreeView Root Node.
C#
private void PopulateTreeView()
        {
using (var context = new DiagnosoftContext())
                        {
                            var q = (from i in context.Patients
                                     group i by i.BillDate into grpDate
                                     select grpDate);          

                            var query = q.ToList();

 foreach (var item in query)
                            {
                                TreeNode treeRoot = new TreeNode();
                                treeRoot.Nodes.Add(item.ToString());
                                treePatient.Nodes.Add(treeRoot);
                            }
}


Please help me. Thanking you.
Posted
Comments
Nelek 24-Jun-13 17:28pm    
Which error? In which line? What is the debugger saying?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900