protected void AddCustomButton(DataWindowButton dataWindowButton) { if (InternalGrid != null) { throw new InvalidOperationException(Exceptions.DataWindowButtonCanOnlyBeAddedWhenWindowIsNotLoaded); } _buttons.Add(dataWindowButton); }