G
Guest
Hi,
[ BTW, I'm using C# in WindowsForms. ]
I'm using a DataSet and have a main table ( i.e. of users ), and sub-tables
which contain further information about the entries in the main table ( i.e.
group membership, etc.. ). These sub-tables contain 1-many type
relationships ( i.e. a user can belong to many groups ). I have set-up a
DataRelation so that these entries are linked and when they are displayed in
the DataGrid I get the DataRelation link which then displays the group
membership entries for that user in its own grid.
Is it possible to concatinate the group membership entries ( i.e. comma
separated group names ) into an extra column when the main table is shown in
the datagrid - I would really want this to be automatic through the
DataRelation, rather than have to calculate it separately - although any
solution would be appreciated !! ;-). I only want a single datagrid so cant
have a master-detail type display.
I've tried adding a DataColumn and using the expression proptery, but this
only seems to allow single values or number collation ( SUM, etc.. ), not
string collation.
Thanks in advance
RichS
For example, I would want to show the following in my datagrid:
User Name || Groups
Bill || Finance, Sales
If i had the following in my DataSet:
User Table:
User_ID || UserName
1 || Bill
Group Membership Table:
User_ID || Group_ID
1 || 1
1 || 2
Group Table:
Group_ID || Group_Name
1 || Sales
2 || Finance
[ BTW, I'm using C# in WindowsForms. ]
I'm using a DataSet and have a main table ( i.e. of users ), and sub-tables
which contain further information about the entries in the main table ( i.e.
group membership, etc.. ). These sub-tables contain 1-many type
relationships ( i.e. a user can belong to many groups ). I have set-up a
DataRelation so that these entries are linked and when they are displayed in
the DataGrid I get the DataRelation link which then displays the group
membership entries for that user in its own grid.
Is it possible to concatinate the group membership entries ( i.e. comma
separated group names ) into an extra column when the main table is shown in
the datagrid - I would really want this to be automatic through the
DataRelation, rather than have to calculate it separately - although any
solution would be appreciated !! ;-). I only want a single datagrid so cant
have a master-detail type display.
I've tried adding a DataColumn and using the expression proptery, but this
only seems to allow single values or number collation ( SUM, etc.. ), not
string collation.
Thanks in advance
RichS
For example, I would want to show the following in my datagrid:
User Name || Groups
Bill || Finance, Sales
If i had the following in my DataSet:
User Table:
User_ID || UserName
1 || Bill
Group Membership Table:
User_ID || Group_ID
1 || 1
1 || 2
Group Table:
Group_ID || Group_Name
1 || Sales
2 || Finance