G
Guest
Hello
Thanks for reviewing my question. I believe I read that a DataGrid can point to a collection but would like to know if you can point to an example. How does the DataGrid know what are the column headings? I created my own collection and would like a DataGrid on a Form to use it. For example
private class EventDetail
public EventDetails(string name) { this.sEventName = name;
public string EventName { get { return sEventName; }
private string sEventName
}
private class ScheduledEvents : IEnumerabl
public ScheduledEvents() { eventList.Add(new EventDetails("Event 1"));
public ArrayList eventList = new ArrayList()
public IEnumerator GetEnumerator() { return eventList.GetEnumerator();
}
DataGrid.DataSource = ScheduledEvents
DataGrid.DataMember = "EventName"
Is this possible
Many Thanks to the Expert
Pete
Thanks for reviewing my question. I believe I read that a DataGrid can point to a collection but would like to know if you can point to an example. How does the DataGrid know what are the column headings? I created my own collection and would like a DataGrid on a Form to use it. For example
private class EventDetail
public EventDetails(string name) { this.sEventName = name;
public string EventName { get { return sEventName; }
private string sEventName
}
private class ScheduledEvents : IEnumerabl
public ScheduledEvents() { eventList.Add(new EventDetails("Event 1"));
public ArrayList eventList = new ArrayList()
public IEnumerator GetEnumerator() { return eventList.GetEnumerator();
}
DataGrid.DataSource = ScheduledEvents
DataGrid.DataMember = "EventName"
Is this possible
Many Thanks to the Expert
Pete