protected void GetIncidentEquipment() { DataSet Equipment = new DataSet(); AdvancedSearch EquipRetrieve = new AdvancedSearch(); Equipment = EquipRetrieve.IncidentEquipment(IncNumber); if (Equipment.Tables[0].Rows[0]["Equipment Description"].ToString() == "") { lbl_gridanounce.ForeColor = Color.Red; lbl_gridanounce.Text = "No Equipment was entered into our system for this incident."; } else { try { lbl_gridanounce.Text = "Equipment Used at this incident:"; EqupmentUsedGrid.AutoGenerateColumns = true; EqupmentUsedGrid.DataSource = Equipment; EqupmentUsedGrid.DataBind(); EqupmentUsedGrid.UseAccessibleHeader = true; EqupmentUsedGrid.HeaderRow.TableSection = TableRowSection.TableHeader; } catch (Exception exception) { lbl_gridanounce.Text = exception.ToString(); } } }
protected void EqupmentUsedGrid_PageIndexChanging(object sender, System.Web.UI.WebControls.GridViewPageEventArgs e) { EqupmentUsedGrid.PageIndex = e.NewPageIndex; EqupmentUsedGrid.DataBind(); EqupmentUsedGrid.UseAccessibleHeader = true; EqupmentUsedGrid.HeaderRow.TableSection = TableRowSection.TableHeader; Mobsupdate.Update(); //update (update)panel }