View Code for Web/WebControls/SemesterList.ascx

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

<%@ Control CodeBehind="SemesterList.ascx.cs" Inherits="QuantumConcepts.CodeGenerator.Sample.Web.WebControls.SemesterList" 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="Begin" DataField="Begin" HeaderStyle-Width="150px" ItemStyle-Width="150px" />
      <asp:BoundColumn HeaderText="End" DataField="End" HeaderStyle-Width="150px" ItemStyle-Width="150px" />
      <asp:BoundColumn HeaderText="Name" DataField="Name" />
      <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>