ASP.NET Logo Back to WebMatrix Home

 
ASP.NET Pages with Data
Format the MxDataGrid
In this walkthrough, you will change the formatting and behavior of the MXDataGrid.
  1. Open the myFirstDataGrid.aspx file in Design view.

     
  2. Select the MXDataGrid control.

     
  3. Select the AllowPaging property in the Properties window.

     
  4. Set the AllowPaging property of the MXDataGrid to False. This property toggles the paging functionality of the MXDataGrid

    Paging Property

  5. Select the Fields property in the Properties window. 

    Fields Property

  6. You will see the Collection Editor dialog box appear. 

    Collection Editor Dialog

  7. Change the HeaderText property of the OrderID column from OrderID to ID.

     
  8. Click OK

    Modify Column Header

  9. Save and run the ASP.NET page.

     
  10. Your ASP.NET page will automatically appear in a new instance of your Web browser. Note the first column header is ID and the page number no longer appears at the bottom of the MXDataGrid

    Updated Data Grid

  11. Close the Web browser instance.

Next Step >>