Sample Class (one of the many I have tried) and sample data is at the bottom.
When using the PivotGrid, I could use a little assistance on how to get the row dimensions to properly travel my hierarchy properly.
I am using the following Hierarchy.
Activities (A)
Disciplines (D)
Systems (S)
Tasks (T)
I have been able to get it to work with just one Activities and Disciplines, but I cannot get it working with all 4 items. I have attached my last attempt, which was creating the class with the ID/Name pair for each of the 4 items, and then filling the records up, but it still keeps choking at the 3rd level. I have tried nesting them as well, when worked perfectly for the treeview control, but completely blew up on the PivotGrid.
So, what I am trying to accomplish is have a pivot grid that will be as follows when fully expanded.
A1
D1
S1
T1
T2
S2
T3
D2
S3
T3
A2 ....etc
Thanks in advance for your assistance!
Ed
public class PhasePivotVM
{
public Single Score { get; set; }
public int ActivityID { get; set; }
public ActivityTypeVM ActivityTypes { get; set; }
public int DisciplineID { get; set; }
public DisciplineTypeVM DisciplineTypes { get; set; }
public int SystemID { get; set; }
public SystemTypeVM SystemTypes { get; set; }
public int TaskID { get; set; }
public TaskTypeVM TaskTypes { get; set; }
public PhasePivotVM()
{
ActivityTypes=new ActivityTypeVM();
DisciplineTypes = new DisciplineTypeVM();
SystemTypes = new SystemTypeVM();
TaskTypes = new TaskTypeVM();
}
}
public class ActivityTypeVM
{
public int? ActivityID { get; set; }
public string ActivityName { get; set; }
}
public class DisciplineTypeVM
{
public int? DisciplineID { get; set; }
public string DisciplineName { get; set; }
}
public class SystemTypeVM
{
public int? SystemID { get; set; }
public string SystemName { get; set; }
}
public class TaskTypeVM
{
public int? TaskID { get; set; }
public string TaskName { get; set; }
}
ActivityID DisciplineID SystemID TaskID ItemScore ItemName
4 NULL NULL NULL 100 *Exist but are all hidden for privacy*
4 13 NULL NULL 100
4 13 40 NULL 100
4 13 40 188 100
4 13 40 278 100
4 13 40 279 100
5 NULL NULL NULL 100
5 23 NULL NULL 100
5 23 41 NULL 100
5 23 41 414 98