I have a databound control which displays a grid. The grid is bound to a linq to sql data source. I use the following code:
PaymentsDataContext data = new PaymentsDataContext();
var q = from act in data.activations
where act.approved != true
orderby act.activationDate ascending
select new {activationID = act.activationID, userName = act.userName,
brokerName = act.broker.brokerName, existingAccount = act.existingAccount,
activationDate = act.activationDate, brokerUser = act.brokerUser, approved = act.approved};
activationPending.DataSource = q;
activationPending.DataBind();
I want to add another column to the grid. I want to show the user's email address. I get it like so:
var member = System.Web.Security.Membership.GetUser(username);
string email = member.Email;
How could I add this as a field in the grid, since it's not in the Payment DB at all?