How to bind a List<DateTime> to a DataGridView/ListBox .NET C#
- by nat
Hi there
I have a List that I want to bind to a DataGridView in a windows forms app.
however, I cannot for the life of me find the DataPropertyName I need to show what I want. I have had similar problems with binding this list to a listbox.
what i really want is to show .ToString("dddd, dd MMMM yyyy HH:mm"), or certainly more than the standard 'date' part of the datetime - do i need to add a property of my own?
public partial class DateTime{
public string myFormat{
get{return this.ToString("dddd dd MMM yyyy HH:mm");}
}
}
or some such?
thanks
nat