# WebForms Grid Overview

This article introduces Telerik UI for ASP.NET AJAX RadGrid and shows how to enable data binding, paging, sorting, filtering, editing, grouping, exporting, and accessibility support.

Telerik **RadGrid** provides rich functionality for ASP.NET applications while generating minimal output. For supported browsers, see [Browser Support for Telerik UI for ASP.NET AJAX](https://www.telerik.com/aspnet-ajax/tech-sheets/browser-support).

> caption To create a basic `RadGrid`:

1. Ensure that the page contains a script manager by declaring an `<asp:ScriptManager>` tag.
2. Declare the grid with the `<telerik:RadGrid>` tag and set its global properties.
3. Set the `DataSource` or `DataSourceID` property to reference the collection or data source component. See [Telerik RadGrid data binding basics](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-binding/overview).
4. Declare the main table with `<telerik:MasterTableView>` and set its properties.
5. Declare columns with tags that match the content type. Set each `DataField` property to the model field name. See [RadGrid column types](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/columns/column-types).

> caption Get started with the grid declaration and enabling some of its features

```ASP.NET
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AllowSorting="true" AllowFilteringByColumn="true" OnNeedDataSource="RadGrid1_NeedDataSource">
    <MasterTableView AutoGenerateColumns="False" DataKeyNames="ID">
        <Columns>
            <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="OrderID" ReadOnly="True" UniqueName="ID">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" SortExpression="Name" HeaderText="Employee Name" UniqueName="Name">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="Team" FilterControlAltText="Filter Team column" SortExpression="Team" HeaderText="Team" UniqueName="Team">
            </telerik:GridBoundColumn>
            <telerik:GridDateTimeColumn DataField="HireDate" DataType="System.DateTime" FilterControlAltText="Filter HireDate column" SortExpression="HireDate" HeaderText="Hire Date" UniqueName="HireDate">
            </telerik:GridDateTimeColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
```

> caption Provide the RadGrid with a data collection in the code-behind

```C#
protected void RadGrid1_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    // Supply the records when RadGrid requests its data.
    (sender as RadGrid).DataSource = MyData; 
}

// Create sample records for the example grid.
public IEnumerable<SampleData> MyData = Enumerable.Range(1, 30).Select(x => new SampleData
{
    Id = x,
    Name = "Name " + x,
    Team = "Team " + x % 5,
    HireDate = DateTime.Now.AddDays(-x*3).Date
});

public class SampleData
{
    public int Id { get; set; }
    public string Name { get; set; }
    public string Team { get; set; }
    public DateTime HireDate { get; set; }
}
```

```VB
Protected Sub RadGrid1_NeedDataSource(ByVal sender As Object, ByVal e As GridNeedDataSourceEventArgs)
    ' Supply the records when RadGrid requests its data.
    TryCast(sender, RadGrid).DataSource = MyData
End Sub

' Create sample records for the example grid.
Public MyData As IEnumerable(Of SampleData) = Enumerable.Range(1, 30).[Select](Function(x) New SampleData With {
    .Id = x,
    .Name = "Name " & x,
    .Team = "Team " & x Mod 5,
    .HireDate = DateTime.Now.AddDays(-x * 3).Date
})

Public Class SampleData
    Public Property Id As Integer
    Public Property Name As String
    Public Property Team As String
    Public Property HireDate As DateTime
End Class
```

The result from the code example is shown in the following image:
![Basic RadGrid Example](https://www.telerik.com/products/aspnet-ajax/documentation/assets/d06aa1b7c5a1f3307ccb44f07a8f544b/grid-overview-basic-create.png "Basic Grid Example")

Review the most commonly used key features below, or go directly to [Getting Started with RadGrid](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/getting-started).

## Basic Grid

![WebForms Basic Grid](https://www.telerik.com/products/aspnet-ajax/documentation/assets/ecf4bba7b585a62a4b7ae0c0b2df7d57/grid-overview-basic.png "Basic Grid")

## Advanced Grid

![WebForms Advanced Grid](https://www.telerik.com/products/aspnet-ajax/documentation/assets/2edf300933b000bdebaf37d14600d7f1/grid-overview-advanced.png "Advanced Grid")

Explore these key RadGrid functionalities:

* [Paging](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/paging/overview)
* [Filtering](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/filtering/overview)
* [Grouping](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/grouping/overview)
* [Data Binding](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-binding/overview)
* [Hierarchy](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/hierarchical-grid-types-and-load-modes/what-you-should-know)
* [CommandItem](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-editing/commanditem/overview)
* [Export To Excel](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/exporting/excel-export/excel-xlsx)
* [Export To CSV](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/exporting/csv)
* [Export To PDF](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/exporting/pdf)
* [Export To DOC](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/exporting/word-export/word-docx)
* [Print](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/printing/printing)
* [Accessibility Compliance](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/accessibility-and-internationalization/wcag-2.0-and-section-508-accessibility-compliance)

## Colorful Grid with built-in Skins

See the [RadGrid skinning options](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/appearance-and-styling/skins).

![WebForms Grid Overview Skins](https://www.telerik.com/products/aspnet-ajax/documentation/assets/98563da26970d91884f726512c5aa8f0/grid-overview-skins.gif "Grid built-in Skins")

## Paging

See the [RadGrid paging options](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/paging/overview).

![WebForms Grid Overview Paging](https://www.telerik.com/products/aspnet-ajax/documentation/assets/ce183ff844881defcf5ff93bcd5c1d67/grid-overview-paging.png "Grid Paging")

## Filtering

See the [RadGrid filtering options](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/filtering/overview).

![WebForms Grid Overview Filtering](https://www.telerik.com/products/aspnet-ajax/documentation/assets/fe0cd5b1a0400c971a60072c1d10363c/grid-overview-filtering.png "Grid Filtering")

## Sorting

See the [RadGrid sorting options](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/sorting/overview).

![WebForms Grid Overview Sorting](https://www.telerik.com/products/aspnet-ajax/documentation/assets/37e884a0cf035ef0803da6ae017ddeea/grid-overview-sorting.png "Grid Sorting")

## Grouping

See the [RadGrid grouping options](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/functionality/grouping/overview).

![WebForms Grid Overview Grouping](https://www.telerik.com/products/aspnet-ajax/documentation/assets/1ae1d09f021f1c8e0d733060e716a13a/grid-overview-grouping.png "Grid Grouping")

## Hierarchy

See the [RadGrid hierarchical structure and load modes](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/hierarchical-grid-types-and-load-modes/what-you-should-know).

![WebForms hierarchy grid overview](https://www.telerik.com/products/aspnet-ajax/documentation/assets/c37f04df13df0e3a3375e1cf45295ea2/grid-overview-hierarchy.png "Hierarchy Grid")

## Create, Read, Update, and Delete (CRUD) Operations

RadGrid supports server-side and client-side editing through several edit-form options.

### Server-Side Editing

Choose one of these server-side editing options:

### Edit Form

See the [RadGrid edit forms](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-editing/edit-mode/edit-forms).

![Grid Edit Form](https://www.telerik.com/products/aspnet-ajax/documentation/assets/f46dc9d05de7aa01040c19447b0dd36b/grid-overview-editforms.png "Grid Edit Form")

### Popup Edit Form

See the [RadGrid popup edit forms](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-editing/edit-mode/popup-edit-form).

![Grid PopUp Edit Form](https://www.telerik.com/products/aspnet-ajax/documentation/assets/6c29894751801ecdd9be43e4f992804a/grid-overview-popup.png "Grid PopUp Edit Form")

### In-place Editing

See [RadGrid in-place editing](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-editing/edit-mode/in-place).

![Grid InPlace Edit Form](https://www.telerik.com/products/aspnet-ajax/documentation/assets/cbfe25c1004c9abe70c60c4d50db8ea2/grid-overview-inplace.png "Grid InPlace Edit Form")

### Client-Side Editing

Use batch editing to update multiple records on the client before sending the changes to the server.

### Batch Editing

See [RadGrid batch editing](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/data-editing/edit-mode/batch-editing/overview).

![Grid Batch Edit Form](https://www.telerik.com/products/aspnet-ajax/documentation/assets/65f45cd4df64877135c9acef9c439c21/grid-overview-batchedit.png "Batch Editing")

## API Reference

Use these API references for the RadGrid and its table views:

* [Telerik.Web.UI.RadGrid](https://docs.telerik.com/devtools/aspnet-ajax/api/server/Telerik.Web.UI/RadGrid) (RadGrid)

* [Telerik.Web.UI.GridTableView](https://docs.telerik.com/devtools/aspnet-ajax/api/server/Telerik.Web.UI/GridTableView) (MasterTable and/or DetailTables)

## See Also

Continue with these related RadGrid resources:

* [Getting Started](https://www.telerik.com/products/aspnet-ajax/documentation/controls/grid/getting-started)

* [RadGrid overview demos](https://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx)

* [Telerik UI for ASP.NET AJAX Grid](https://www.telerik.com/products/aspnet-ajax/grid.aspx)
