/// <summary> /// This raises the <see cref="Current"/> event /// </summary> /// <param name="e">The event arguments</param> protected virtual void OnCurrent(DataListEventArgs e) { var handler = Current; if(handler != null) handler(this, e); }
/// <summary> /// Change the color of the row based on the zip code when a row is data bound /// </summary> /// <param name="s">The sender of the event</param> /// <param name="e">The event arguments</param> private void dlList_ItemDataBound(object sender, DataListEventArgs e) { if(dlList[e.Index, "Zip"].ToString() == "98122") e.Item.BackColor = Color.LightSteelBlue; else e.Item.BackColor = SystemColors.Control; }
/// <summary> /// This raises the <see cref="CanceledEdits"/> event /// </summary> /// <param name="e">The event arguments</param> protected internal virtual void OnCanceledEdits(DataListEventArgs e) { var handler = CanceledEdits; if(handler != null) handler(this, e); }
/// <summary> /// This raises the <see cref="DeletedRow"/> event /// </summary> /// <param name="e">The event arguments</param> protected virtual void OnDeletedRow(DataListEventArgs e) { var handler = DeletedRow; if(handler != null) handler(this, e); if(listManager != null && listManager.Count == 0) OnNoRows(EventArgs.Empty); }
/// <summary> /// This raises the <see cref="AddedRow"/> event /// </summary> /// <param name="e">The event arguments</param> protected internal virtual void OnAddedRow(DataListEventArgs e) { var handler = AddedRow; if(handler != null) handler(this, e); }
/// <summary> /// This raises the <see cref="FooterDataBound"/> event /// </summary> /// <param name="e">The event arguments</param> protected virtual void OnFooterDataBound(DataListEventArgs e) { var handler = FooterDataBound; if(handler != null) handler(this, e); }
/// <summary> /// This raises the <see cref="ItemDataBound"/> event /// </summary> /// <param name="e">The event arguments</param> protected internal virtual void OnItemDataBound(DataListEventArgs e) { var handler = ItemDataBound; if(handler != null) handler(this, e); }