I am building a custom compoment that can be dragged from the toolbox onto a form.
It exposes a List of type DataTable, and this works well so far.
What I am missing is that when I put a BindingSource on the same form, in the designer the BindingSource does not see my collection of DataTables. So I cannot select one of the DataTables from the custom component. I know I can do this in code but that is not the idea, I want to do it in the designer.
How can I accomplish this ?
The code for the public collection of DataTables is this
[Serializable]
public partial class gttDataModule : Component
{
private List<DataTable> _dataTables = new List<DataTable>();
public List<DataTable> DataTables
{
get { return _dataTables; }
set { _dataTables = value; }
}
The collection of DataTables is populated and filled with columns and everything, see also the attached image.
Everything works except that BindingSources and other controls that can accept a DataTable as DataSource do not see this collection.
Is there a way to accomplish this ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…