Click here to Skip to main content
14,971,742 members
Please Sign up or sign in to vote.
1.11/5 (2 votes)
See more:
how to bind data in gridview using webservice in client side?
Updated 13-Jan-19 19:27pm
Web Service? In client side? What it is supposed to mean? What is a client of what? :-)

Simple and useful CodeProject article is available at Web Services, a simple approach[^]
Here, have a look at the following:
WebService call[^]

Once you receive back the response, set the grid data as it.
GridView is a server-side data representation control and it recommended to bind it with data at the server. If you want to use GridView, you need to use transform the result from your webservice and convert it into a DataTable or a List type so you can bind them in your GridView. Here's an example on how to consume WebService in ASP.NET: Consuming Web Service In an ASP.Net Web Application[^]

Now, if you want to bind your GridView at the client using JavaScript/jQuery then GridView isn't the best control for you. While it could be possible, I'm pretty sure it give you a pain in the butt. What I'm trying to say is you must avoid mixing server side conntrols with client-side manipulation. Instead, use a client-side Grid that you can easily bind them at the client. One great example is using jQuery DataTable plugin: Display Data In ASP.NET Using jQuery DataTables Plugin[^]
CHill60 14-Jan-19 8:47am
I'm guessing that Solution 3 resurrected this old post.
Vincent Maverick Durano 14-Jan-19 9:37am
My bad. I missed the posted date again.

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