Hello,
I have a hiearchal radgrid with a parent level that has 2 key columns.
For example:
ID, Sequence, first_name, last_name
This can result in data that looks like the following:
1, 1, John, Doe
1, 2, Adrian, Shepard
2, 1, Mary, Jane
That child level has:
ID, Sequence, Data
So you can have data that looks like the following:
1, 1, 0.256
1, 2, 0.944
2, 1, 0.109
How can I code the grid so that the child level uses both ID and Sequence as a composite key when the radgrid is built entirely in code?
At the moment I use:
relationFields =
New
GridRelationFields()
relationFields.MasterKeyField =
"ID"
relationFields.DetailKeyField =
"ID"
tableView.ParentTableRelation.Add(relationFields)
How do I code it so that it references both ID and Sequence as the relationship so that the grid looks like:
John, Doe
0.256
Adrian, Shepard
0.944
Mary, Jane
0.109
instead of:
John, Doe
0.256
0.944
Adrian, Shepard
0.256
0.944
Mary, Jane
0.109
which is wrong, since it is repeating the values on 2 rows because they share the first part of the relationship instead of also considering the second column.
I've looked in the documentation but the only information I've found on creating a composite key relationship involved doing so in the HTML, which is not an option for me as the radgrid is 100% generated in VB code on the server side.
Thanks for any assistance.