/// <summary> /// Sets the state of the buttons after callbacks before rendering /// </summary> /// <param name="e">Event args</param> protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); DetailsViewModel dvm = Model as DetailsViewModel; if (dvm == null) { return; } if (btn_Save != null) { btn_Save.Enabled = dvm.SaveEnabled(); } if (btn_Delete != null) { btn_Delete.Enabled = dvm.DeleteEnabled(); } }