I have two interfaces, IAuditable and ITransaction.
public interface IAuditable{
DateTime CreatedOn { get; }
string CreatedBy { get; }
}
public interface ITransaction : IAuditable {
double Amount{ get; }
}
And a class that implements ITransaction, call Transaction.
public class Transaction : ITransaction{
public DateTime CreatedOn { get { return DateTime.Now; } }
public string CreatedBy { get { return "aspnet"; } }
public double Amount { get { return 0; } }
}
When I bind a list of ITransactions to a datagrid and use auto create columns, only the Amount gets bound. The CreatedBy and CreatedOn are not seen. Is there a way I can get these values visible during databinding?