I have a List I am binding to a repeater like this:
MessagesList = GetMessages(this, new MessagesEventArguments(_userID, 0));
InboxRepeater.DataSource = MessagesList;
InboxRepeater.DataBind();
It basically looks like an Outlook inbox.
FROM | SUBJECT | DATE
JDoe Hey 2.2.2011
My issue is that need to add nested rows to this repeater.
In my MessagesList their is an ID field that it brings back. So it would something like:
messageId = 1 | EncId = 1
messageId = 2 | EncId = 1
messageId = 3 | EncId = 1
messageId = 4 | EncId = 2
messageId = 5 | EncId = 3
For all messages with an EncId, if the EncId's are the same (like all EncId's that equal 1), I need to group them together in a new nested repeater. For each other unique EncId I need to create a new nested repeater so the output would look like something below.
FROM | SUBJECT | DATE
JDoe Hey 2.2.2011
Steve Meeting 2.4.2011
George --> This would be a new repeater a this line would be the header row
"This would be the subject for messageId = 1 | EncId = 1" 2.5.2011
"This would be the subject for messageId = 2 | EncId = 1" 2.5.2011
"This would be the subject for messageId = 3 | EncId = 1" 2.5.2011
Rick Hey2 2.2.2011
John Maintenence 2.4.2011
Alex --> This would be a new repeater a this line would be the header row
"This would be the subject for messageId = 4 | EncId = 2" 2.5.2011
Bill Test Subject 2.6.2011
Harris Test 3.9.2010
Alex --> This would be a new repeater a this line would be the header row
This would be the subject for messageId = 5 | EncId = 3 2.5.2011
Can somebody help me with how I can do this???