P
Paolo
I'm trying to populate a rich text box with the results of a query, thus:
private void button1_Click(object sender, EventArgs e)
{
var query
from trans in dataSet.Transaction
select new
{
trans.T_Date,
trans.T_PayeeId,
trans.T_Category,
trans.T_SubCategory,
trans.T_PayMethod,
trans.T_Amount
};
foreach (var item in query)
{
richtxbxAnalysis.Text = query.Cast<object>().ToString();
}
}
My text box is showing:
"System.Data.EnumerableRowCollection`1[System.Object]" and nothing else.
I'd appreciate advice on how to display the data requested in the query.
private void button1_Click(object sender, EventArgs e)
{
var query
from trans in dataSet.Transaction
select new
{
trans.T_Date,
trans.T_PayeeId,
trans.T_Category,
trans.T_SubCategory,
trans.T_PayMethod,
trans.T_Amount
};
foreach (var item in query)
{
richtxbxAnalysis.Text = query.Cast<object>().ToString();
}
}
My text box is showing:
"System.Data.EnumerableRowCollection`1[System.Object]" and nothing else.
I'd appreciate advice on how to display the data requested in the query.