How to Bind in Compact Framework

  • Thread starter Thread starter Ben R. Bolton
  • Start date Start date
B

Ben R. Bolton

How does one bind a Grid/ListBox/TextBox.. etc. to a data source for a
Pocket PC application. I"ve been banging my head against the wall trying
figure out how it is done. I have created a data set and initialized it
with data, but when I asociate the DataSource to the DataSet, or DataTable,
nothing happens!

Can you databind datasources in PocketPC applications?
If so any help on how to get started would be appreciated.

Ben
 
Yes, for the textbox and label you must use the DataBindings property. With
a DataSet an example would be:

lblTest.DataBindings.Add(new Binding("Text", DataSet.DataTable));

For the DataGrid/ListBox you use the DataSource property and point it to a
DataTable/DataView.
 
Back
Top