How can i data bind a gridview control from a web service called using client side javascript? Right now, I am using rendercontrol method to send html string back (stringwriter and htmltextwriter and returning string). But, in this manner, I lose gridview
clicking like selection, etc. How can i bind a gridview using syntax such as gridview1.databind() from within an asmx page, ANDALSo the asmx page is getting called using clientside javascript so there is no screen flicker.
aspcheetah
Member
19 Points
65 Posts
Databinding Gridview from Web Service?
Oct 01, 2009 09:38 PM|LINK
Hi,
How can i data bind a gridview control from a web service called using client side javascript? Right now, I am using rendercontrol method to send html string back (stringwriter and htmltextwriter and returning string). But, in this manner, I lose gridview clicking like selection, etc. How can i bind a gridview using syntax such as gridview1.databind() from within an asmx page, ANDALSo the asmx page is getting called using clientside javascript so there is no screen flicker.
Thanks
qwe123kids
All-Star
48619 Points
7957 Posts
MVP
Re: Databinding Gridview from Web Service?
Oct 02, 2009 08:54 AM|LINK
Hi,
U cannot use Javascript to Bind GridView as GridView is server side contrrol..
and javascript is Client side control
OR
U maY use IcallBak Interface With GridView..
http://msdn.microsoft.com/en-us/library/bb360964.aspx
http://forums.asp.net/t/1393271.aspx
chk the above link
OR
U may Keep Your GridView in Updat panel and Load Information On
each updated
///For Webservice and Gridview
http://www.codeproject.com/KB/XML/webservicessimple.aspx
http://www.codegod.de/WebAppCodeGod/webservice-aspnet-with-gridview-and-datagridview-AID310.aspx
Avinash Tiwari
Remember to click “Mark as Answer” on the post, if it helps you.
Vince Xu - M...
All-Star
80367 Points
6801 Posts
Re: Databinding Gridview from Web Service?
Oct 05, 2009 07:08 AM|LINK
Hi,
After get the data from web service, you can use javascript to bind on the table. Please check the following link:
http://forums.asp.net/t/1422932.aspx