<mm:mmGridView ID="grdSurveys" runat="server" AccessLevel="Full" AutoGenerateColumns="False" BackColor="White" BindingSource="Survey" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" ControlID="00000000-0000-0000-0000-000000000000" GridLines="Vertical" IsPostBack="False" OnRowCancelingEdit="grdSurveys_RowCancelingEdit" OnRowDeleting="grdSurveys_RowDeleting" OnRowEditing="grdSurveys_RowEditing" OnRowUpdating="grdSurveys_RowUpdating" SecuritySetup="True" AllowPaging="True" OnPageIndexChanging="grdSurveys_PageIndexChanging" DataKeyNames="survey_id" BindingSourceMember="" UserFieldName=""> <Columns> <asp:CommandField ButtonType="Button" ShowEditButton="True" > <itemstyle wrap="False" /> </asp:CommandField> <asp:BoundField DataField="job_id" HeaderText="JobID" > <controlstyle width="40px" /> <itemstyle wrap="False" /> </asp:BoundField> <asp:BoundField DataField="survey_date" HeaderText="Date" DataFormatString="{0:M/d/yy}" HtmlEncode="False" > <controlstyle width="65px" /> <itemstyle wrap="False" /> </asp:BoundField> <asp:BoundField DataField="lot_id" HeaderText="Lot #" > <controlstyle width="50px" /> <itemstyle wrap="False" /> </asp:BoundField> <asp:BoundField DataField="address_line1" HeaderText="Address Line1" > <itemstyle wrap="False" /> </asp:BoundField> <asp:BoundField DataField="address_line2" HeaderText="Line2" > <itemstyle wrap="False" /> </asp:BoundField> <asp:BoundField DataField="City" HeaderText="City" > <itemstyle wrap="False" /> </asp:BoundField> <asp:BoundField DataField="State" HeaderText="State" > <controlstyle width="30px" /> </asp:BoundField> <asp:BoundField DataField="zip" HeaderText="Zip" > <controlstyle width="50px" /> </asp:BoundField> <asp:BoundField DataField="longitude" HeaderText="Longitude" ReadOnly="True" DataFormatString="{0:#.000000}" HtmlEncode="False" > <itemstyle wrap="False" /> </asp:BoundField> <asp:BoundField DataField="latitude" HeaderText="Latitude" ReadOnly="True" DataFormatString="{0:#.000000}" HtmlEncode="False" > <itemstyle wrap="False" /> </asp:BoundField> <asp:CommandField ButtonType="Button" ShowDeleteButton="True" > <itemstyle wrap="False" /> </asp:CommandField> </Columns> <FooterStyle BackColor="#CCCCCC" ForeColor="Black" /> <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" /> <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" /> <RowStyle BackColor="#EEEEEE" ForeColor="Black" /> <AlternatingRowStyle BackColor="Gainsboro" /> <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" /> <PagerSettings NextPageText="Next" PreviousPageText="Previous" /> </mm:mmGridView>And the ASPX.CS code
public partial class SurveyorAdmin_SurveyList : mmBusinessWebPage { Survey oSurvey; /// <summary> /// Page Load handler /// </summary> /// <param name="sender">Event source</param> /// <param name="e">Event args</param> protected void Page_Load(object sender, EventArgs e) { oSurvey = (Survey)RegisterBizObj(new Survey()); if (!IsPostBack) { oSurvey.GetSurveyorSurveys((int)Session["surveyorid"]); Session["dsSurveys"] = this.oSurvey.DataSet; lblCount.Text = this.oSurvey.DataSet.Tables[0].Rows.Count.ToString(); } else { DataSet dsSurveys = (DataSet)Session["dsSurveys"]; this.oSurvey.SetCurrentDataSet(dsSurveys); } } protected void grdSurveys_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e) { this.grdSurveys.EditIndex = -1; this.BindControl(this.grdSurveys); } protected void grdSurveys_RowDeleting(object sender, GridViewDeleteEventArgs e) { DataSet dsSurveys = (DataSet)Session["dsSurveys"]; this.oSurvey.Delete(dsSurveys, e.RowIndex); this.BindControl(this.grdSurveys); } protected void grdSurveys_RowEditing(object sender, GridViewEditEventArgs e) { this.grdSurveys.EditIndex = e.NewEditIndex; this.BindControl(this.grdSurveys); } protected void grdSurveys_RowUpdating(object sender, GridViewUpdateEventArgs e) { this.grdSurveys.EditIndex = e.RowIndex; DataSet dsSurveys = (DataSet)Session["dsSurveys"]; this.Save(this.oSurvey, dsSurveys); this.grdSurveys.EditIndex = -1; this.BindControl(this.grdSurveys); } protected void grdSurveys_PageIndexChanging(object sender, GridViewPageEventArgs e) { grdSurveys.PageIndex = e.NewPageIndex; grdSurveys.DataSource = Session["dsSurveys"]; grdSurveys.DataBind(); } }