Click here to Skip to main content
13,895,506 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
how to bind data in gridview using webservice in client side?
Posted
Updated 13-Jan-19 19:27pm
Comments
   
Web Service? In client side? What it is supposed to mean? What is a client of what? :-)
--SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

Simple and useful CodeProject article is available at Web Services, a simple approach[^]
   
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Here, have a look at the following:
WebService call[^]
PageMethod[^]

Once you receive back the response, set the grid data as it.
   
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

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[^]
   
Comments
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190306.1 | Last Updated 14 Jan 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100