Adding an ASP.NET DataGrid to a page
DataGrid controls let you format and display dynamic data in multi-column grids that are rendered as tables. For more information on DataGrids, and the types of formatting control they provide, see About the ASP.NET DataGrid and DataList controls.
Before inserting the DataGrid server behavior, you must define a DataSet (referred to as a recordset by other document types) for the DataGrid. For more information, see Understanding recordsets.
To add a DataGrid object to a page:
- Open the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select DataGrid.
The DataGrid dialog box appears.
- Complete the DataGrid dialog box and click OK.
For instructions on completing the DataGrid dialog box, see Setting the ASP.NET DataGrid Object dialog box options.
In the Document window, the DataGrid is displayed with a tabbed, gray outline surrounding it. In the Live Data window (View > Live Data), the gray outline disappears and the objects placeholder is replaced with the specified DataGrid.
- About the ASP.NET DataGrid and DataList controls
- Adding an ASP.NET DataList to your page
- Modifying a DataGrid or DataList object