Jivlain
Jivlain

Reputation: 3658

Building a DataTable to a custom control

Are there any tutorials around for how one would go about creating a control that can be bound to a DataSet? I can't seem to find anything much about it on Google.

I've tried this, where my control has a DataRowCollection property called Items (and a dataset called ds, containing a single table):

ctrl.DataBindings.Add("Items", ds.Tables[0], "Rows");

But I get an ArgumentException: Cannot bind to the property or column Rows on the DataSource.

Upvotes: 0

Views: 610

Answers (1)

26071986
26071986

Reputation: 2330

Maybe, this will help: Data Binding in .NET / C# Windows Forms.

Upvotes: 1

Related Questions