Intersoft WebGrid Documentation
Walkthrough: Using WebGrid with ASP.NET AJAX RTM
See Also Send comments on this topic.

Glossary Item Box

This walkthrough shows you how to use WebGrid with ASP.NET AJAX RTM.

During this walkthrough, you will learn how to do the following:

 Prerequisites

In order to complete this walkthrough, you will need the following:

  • Access to the Microsoft Access Northwind database.
  • Visual Studio 2005 Application.

 Step-By-Step Instructions

To create new web application, bind WebGrid to AccessDataSource and use WebFlyPostBackManager

  1. Bind WebGrid to AccessDataSource.
  2. Drag and drop AJAX's UpdatePanel and .NET Button into the page.
  3. Put WebGrid and the AccessDataSource into UpdatePanel.


  4. Set UpdatePanel's Triggers to Button Click event.


  5. On Button Click server side event, add these codes to adding GroupColumn to WebGrid and then present the new changes when the user clicks on a the button
    C# Copy ImageCopy Code
    protected void Button1_Click(object sender, EventArgs e)    
    {        
       WebGrid1.RootTable.GroupedColumns.Add(new WebGridGroup("ContactTitle", SortOrder.Ascending, GroupMode.Collapsed, GroupInterval.Default));
       WebGrid1.DataBind();    
    }
    
  6. Here is the result when you press the Button.


See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.