Hi swap_90,
I have gone through your query and here i have one solution for you :-
Let say you have the Conversation class as below :
public class Conversation
{
public int TableID { get; set; }
public int QueryID { get; set; }
public string Replies { get; set; }
}
Now you got all the conversations as a list of this class object.
Here i have added manually to the list all the test values displayed by you in the query but we can assume them to be retrieved from database and added to a list.
List<conversation> lstConversations = new List<conversation>();
lstConversations.Add(new Conversation() { TableID = 1, QueryID = 12, Replies = "User Posted:Queries" });
lstConversations.Add(new Conversation() { TableID = 2, QueryID = 12, Replies = "Admin Replied: AnySolution" });
lstConversations.Add(new Conversation() { TableID = 13, QueryID = 12, Replies = "User Posted: thanks" });</conversation></conversation>
Now we can use LINQ to get all the replies values as IEnumerable :-
var replies = from r in lstConversations
where r.QueryID==12
select r.Replies;
At last we have to put these replies as multiline text to a Multiline textbox which can be done as below :-
string strReplies = String.Join("\n", replies);
txtMultiTest.Text = strReplies;
Hope this will definitely of help to you.