Reputation: 1651
I am using Dataform to show a object in my Silverlight application. It is a simple Input page which where you can input value and the SAVE button at the bottom submits the information to the database.
My object contains 7 data fields, out of which I need to show only 5 of them. The other two data fields are added in the database directly.
My silverlight application communicates to the database via WCF services.
So, the question is can I filter data fields on the dataform?
Upvotes: 1
Views: 726
Reputation: 1651
Following is the snippet from xaml file
dataFormToolkit:DataForm x:Name="dataForm" CommitButtonContent="Save" CancelButtonContent="Cancel" AutoEdit="True" AutoGenerateFields="False"
Following is the snippet from xaml.cs file
public CreateProduct()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(CreateProduct_Loaded);
}
private void CreateProduct_Loaded(object sender, RoutedEventArgs e)
{
ServiceReference.Product model = new ServiceReference.Product();
dataForm.CurrentItem = model;
}
Upvotes: 0