Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends,
I am New to WCF,WPF . And My Question is I have to Use WCF Service for binding my WPF Datagrid Control.And I have to perform insert,update and delete in WPF Datagrid With the help of WCF Service . Can anyone help me with a sample WPF project with datagrid that consumes WCF Service for insert,update and delete operations . I am using sql server 2008 as my back end
Posted
Updated 4-Jun-13 1:00am
v2

You need to call the service in the event where you need to bind the datagrid like Load event.

When you will call the WCF in WPF you need to create a WCF client at WPF So as to access the service methods, So that you can get the data which is needed to bind the data grid.

For Example...

If you have service named service1 and references as MyServiceExample in WPF..
Client object needed to be created like MyServiceExampleServiceClient clientObject=new MyServiceExampleServiceClient();

Then you will be able to access the methods which returns service methods which binds grid.


--Ariana
 
Share this answer
 
Hi, I would start off by using this link:

http://www.codearsenal.net/2012/09/wcf-service-and-wpf-client-datagrid.html#.Us_cSfRdXsk[^]

This tutorial shows how to use a WCF service as a data source for a WPF grid, I am currently working on a adding a database to this,

Regards,

Nick
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900