I am having a wrapper for example.

public class Student{
       public string Name{get;set}
       public int IDNumber{get;set;}
       public ObservableCollection<SubjectWrapper> Subjects{get;set;}

}
public class SubjectWrapper{
       public string SubjectName{get;set;}
       public bool IsSubjectSelected{get;set;}
}

How can I bind this to Datagrid effectively.There could be any number of subject.All students will have all subject column against there name. Please see the following image.Also I want to follow MVVM pattern.
r.PNG

That's pretty light in detail. Folk would have to guess this is some Windows app or could it be a C# responder to a web query with the data in some SQL database? Also, what is "effectively?" For most folk that means "it works." Or in Pokemon, you use "this" because "it's super effective."

In other words, don't leave others to guess and then guess badly.

Finally, while I do work with patterns there is some penchant for folks new to patterns to use a pattern for everything. Back to reality. Sometimes you must get the job done in the next hour so you make something that works.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.