Spread Silverlight Documentation > Developer's Guide > Managing Data > Binding to Data |
GcSpreadSheet supports binding to any object that implements the IEnumerable interface. This includes the Ilist, ObservableCollection, and WCF datasource. The control also supports binding to an RIA datasource.
GcSpreadSheet supports one way data binding. Changes to the source automatically update the target but, changes to the target are not propagated back to the source.
Specific columns can be bound with the DataField property.
The following example binds the sheet with the DataSource property.
CS |
Copy Code
|
---|---|
public class lname
//Loaded event { lname[] arr = new lname[] { new lname("Smith", 100), new lname("Fender", 3), new lname("Gill", 5) }; } |
VB.NET |
Copy Code
|
---|---|
Public Class lname 'Loaded event Dim arr As lname() = New lname() {New lname("Smith", 100), New lname("Fender", 3), New lname("Gill", 5)} |