Home Forums WinForms controls Xceed Grid for WinForms Version 2.0 Reply To: Version 2.0

User (Old forums)
Member
Post count: 23064

Odi:

Is the following possible with the new Master/detail:

(All unbound data.)

I have a arrayList of “Student” object, that I want to show in a grid.
Each Student object have an ArrayList that contains Class objects.

Would it be possible to show each Student object in a datarow, and underneath each row, the students Class arrayList is shown ?
(+/- icon)

So that I show 2 different objects in the same grid.
And all unbound data.

//code snip……

using System;
using System.Collections;

namespace GridGroupTest
{
public class Student
{
private string studentName = “”;
private ArrayList al_StudentClasses = new ArrayList(); // arraylist that contains Class objects

public Student()
{
}

public string StudentName
{
get
{
return this.studentName;
}
set
{
this.studentName = value;
}
}

public ArrayList Al_StudentClasses
{
get
{
return this.al_StudentClasses;
}
set
{
this.al_StudentClasses = value;
}
}
}
}

……………………………..

using System;

namespace GridGroupTest
{

public class Class
{
private string className = “”;

public Class()
{
}
public string ClassName
{
get
{
return this.className;
}
set
{
this.className = value;
}
}
}
}
……………………………………………..

Regards
C#

Imported from legacy forums. Posted by C# (had 285 views)