The example demonstrates how to use RadGrid client-side data-binding to visualize live data using web service.
The grid is updated after interval of 1 second passes (specified
in the pageLoad handler of the page). This results in simultaneous and seamless pure
client-side end-user experience.
Below is the signature of the web service used in the demo:
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ScriptService]
public class MyWebService : WebService
{
MyBusinessObjectCollection MyBusinessObjectCollection1 = new MyBusinessObjectCollection();
[WebMethod]
public List <MyBusinessObject> GetData()
{
return MyBusinessObjectCollection1.Select(1, 10);
}
}
If you would like to familiarize with the
MyBusinessObjectCollection
class and its
Select method, it is located under the
App_Code/Grid/MyBusinessObjects.cs
class of the RadControls for ASP.NET AJAX installation.
Further information about how to bind RadGrid to live data client-side can be gathered
from client-side binding topic in the documentation:
Live data from web service