Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to bind the data to grid view using silverlight and wcf service
Posted

What is problem in Google, is it broken or what??

Try on google first then post questions here. You must refer Some guidelines for posting questions in the forums[^].

Your query on google[^] gives about 2,940,000 results in 0.34 seconds. Please visit google sometimes.

..and these are TOP 3 Links of that search, which will gives you complete details with some source also, have a look:
GridView Data Binding in ASP.NET Using WCF Service
[^]
MSDN: Bind Data Service Data to Controls (WCF Data Services/Silverlight)[^]
Bind Silverlight Grid view with WCF Service[^]
 
Share this answer
 
Comments
Abhinav S 2-Jul-12 3:52am    
5!
Prasad_Kulkarni 2-Jul-12 4:38am    
Thank you Abhinav!
Sravanthid28 2-Jul-12 4:31am    
i don't have permission to access Google and i know how to bind the data to data grid using data reader in silverlight using wcf service but when i'm trying to use dataadapter i got the error that why i posted my question
Prasad_Kulkarni 2-Jul-12 4:38am    
Rather than this question you must post the error message and respective code snippets then only you can get your answer, because what I have answered is appropriate as per your question. If you want exact answer then you need to elaborate more with what you already have tried. Hope you getting me.
Sravanthid28 2-Jul-12 5:18am    
k this ismy MainPage.xaml code
namespace SilverLightGridView
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
Service1Client Client = new Service1Client();
Client.GetQualificationCompleted += new EventHandler<getqualificationcompletedeventargs>(Client_GetQualificationCompleted);
Client.GetQualificationAsync();
}

void Client_GetQualificationCompleted(object sender, GetQualificationCompletedEventArgs e)
{
GridviewQualification.ItemsSource = e.Result;
}


}
}
and this is my Wcf Service
namespace SilverLightGridView.Web
{
[ServiceContract(Namespace = "")]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class Service1
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Connection"].ToString());
[OperationContract]
public DataSet GetQualification()
{
SqlDataAdapter da = new SqlDataAdapter("Web_Svt_SelectQualification", con);
DataSet ds = new DataSet();
da.Fill(ds);
return ds;
}
}
}
i got the error near "e.result";
Error is :Cannot implicitly convert type 'SilverLightGridView.ServiceReference1.ArrayOfXElement' to 'System.Collections.IEnumerable'. An explicit conversion exists (are you missing a cast?)
Check this tutorial. It will help you.

Silverlight Application with MVVM WCF and EF[^]
 
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