|
|
|||||||
| Home Page |
|||||||
Sorting Gridview Data With AjaxThis tutorial was created with Visual Studio .NET 2008, but can still be recreated with 2005. Microsoft's ASP.NET AJAX Extensions for 2005 can be downloaded at this link. In this tutorial, we will look at how we can use the GridView Control to display data Asynchronously, and how we can sort data in real-time, using AJAX. We will simply create a sample database, but you can use your own if you have one in mind, and we will add a button and a GridView to the ASPX page. Then we will display the data upon button click and allow sorting in real-time. The first thing we will do is create the sample database. For this example, we will just use a table with names and cities, with some sample data. The next thing we will do is add the button, gridview and sqldatasource - then create the data source to our database:
Notice that we have also associated the datasource with our gridview, set our gridview to allow sorting, and created a click event for our button. This click event will make the gridview visible, when clicked:
At present, the functionality will work as intended, but the whole page will post back - creating a delay for the user. What we want to do is to AJAX-enabled this page. We will add a ScriptManager and an UpdatePanel, so our ASPX page will now look something like this:
Our entire code-behind looks like this: Please follow the link to ajaxtutorials.com to continue with the tutorial and code. Happy coding!
Rate this Article:
Current: 0 / 5 stars - 0 vote(s).
Article Tags: Sorting, Ajax, Gridview Data Article Source: http://www.articlesbase.com/programming-articles/sorting-gridview-data-with-ajax-519002.html About the Author:
Related ArticlesRich Internet Applications (ria) Installing Ajax Toolkit for Visual Studio .net 2005 The Web 2.0 Effect: the Characteristics of a Web2.0 Website Finding a Website for Hot Source of CSS Information? Creating a Simple Ajax Control in Asp.net 2.0 and C# What is the Ajax Enabled Google Tool-kit? Your One Stop for CSS Information Got a Question? Ask.Ask the community a question about this article:Frequently Asked Questions How to post a letter on the internet Does anyone know what is ubzpath.com is about? Domain Name List List of valid Domain names Music video Is there any Free online soccer Management games ... Latest Programming ArticlesTips for Buying Software Online Mvc Design Pattern Advantages of Low Cost Contract Programmers in Freelance Programming A Guide to Cnc Kits A Guide to Cnc Tube Bending Machines Ways to Hire Dedicated Php Programmers Top 4 Reasons Why Addressing Web Accessibility is Important Xlphoto Printing, the Best Choice for Banner Printing and Poster Printing More from Ajax TutorialsNesting Updatepanels in Asp.net 3.5 |
|||||||
|
Article Categories
|
|||||||
|
|
|||||||