View Code for Web/WebControls/EnrollmentList.ascx

Source code for the file Web/WebControls/EnrollmentList.ascx is shown below.

<%@ Control CodeBehind="EnrollmentList.ascx.cs" Inherits="QuantumConcepts.CodeGenerator.Sample.Web.WebControls.EnrollmentList" Language="C#" %>
<%@ Register TagPrefix="Common" TagName="PagedDataGrid" Src="~/WebControls/PagedDataGrid.ascx" %>

<Common:PagedDataGrid id="Grid" runat="server" OnNeedsDataBinding="Grid_NeedsDataBinding">
  <DataGrid DataKeyField="ID" AutoGenerateColumns="false" HeaderStyle-CssClass="Header" AlternatingItemStyle-CssClass="Alternate" OnItemCommand="Grid_ItemCommand">
    <Columns>
      <asp:BoundColumn HeaderText="ID" DataField="ID" HeaderStyle-Width="50px" ItemStyle-Width="50px" />
      <asp:BoundColumn HeaderText="Student" DataField="Student" />
      <asp:BoundColumn HeaderText="Course" DataField="Course" />
      <asp:ButtonColumn Text="Edit" CommandName="Edit" ButtonType="LinkButton" HeaderStyle-CssClass="Action" ItemStyle-CssClass="Action" />
      <asp:ButtonColumn Text="Delete" CommandName="Delete" ButtonType="LinkButton" HeaderStyle-CssClass="Action" ItemStyle-CssClass="Action" />
    </Columns>
  </DataGrid>
</Common:PagedDataGrid>