/// <summary> /// Adjusts the selected button after inserting an item. /// </summary> /// <param name="index">The index of the item</param> /// <param name="value">The item inserted</param> protected override void OnInsertComplete(int index, object value) { base.OnInsertComplete(index, value); ToolbarCheckGroup group = ParentCheckGroup; if (!Reloading && (group != null) && ((IStateManager)this).IsTrackingViewState) { group.ResolveSelectedItems(); } }
/// <summary> /// Cleans up SelectedCheckButton property /// </summary> /// <param name="index">The index of the object that was removed.</param> /// <param name="value">The object that was removed.</param> protected override void OnRemoveComplete(int index, object value) { base.OnRemoveComplete(index, value); ToolbarCheckButton oldBtn = (ToolbarCheckButton)value; ToolbarCheckGroup group = ParentCheckGroup; if (!Reloading && (group != null) && oldBtn.Selected) { // The selected button was removed group.ResolveSelectedItems(); } oldBtn.SetParentCheckGroup(null); oldBtn.SetParentToolbar(null); }