radGrid - How to detecting a user control edit form close event

1 Answer 43 Views
Grid
SSirica
Top achievements
Rank 2
Iron
Iron
Veteran
SSirica asked on 24 May 2022, 04:14 PM | edited on 24 May 2022, 04:15 PM

I have a grid setup with the following settings for the edit/insert form:

            <EditFormSettings EditFormType="WebUserControl" UserControlName="Controls/ucSite.ascx"
                InsertCaption="INSERT" CaptionFormatString="EDIT">
                <PopUpSettings Width="50%" Modal="True" ScrollBars="Vertical" />
            </EditFormSettings>
This is all working fine, but I have my ValidationSummary on my Master page...also working fine.  Except, when the user closes the edit/insert window using the window X button the messages in the ValidationSummary don't clear.  I found code that should clear it, but I need to do it in an event.  I was hoping there would be some sort of ClientEvent to go along with OnPopUpShowing like OnPopUpClosing...there isn't, so it begs the question...what event is there to detect when an edit/insert Popup closes?

1 Answer, 1 is accepted

Sort by
0
Accepted
SSirica
Top achievements
Rank 2
Iron
Iron
Veteran
answered on 24 May 2022, 07:10 PM

Nevermind...I went in another direction.  I ended up doing this:

<asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="True"
     CommandName="Cancel" Width="98%" CssClass="Rounded" Height="25px" Style="cursor: pointer;" ValidationGroup="Dummy"></asp:Button>
<asp:TextBox ID="txtDummy" runat="server" Visible="false" Text="2" ValidationGroup="Dummy" />
<asp:CustomValidator ID="cvCancel" runat="server" ErrorMessage="" Text="" ValidationGroup="Dummy"
     ControlToValidate="txtDummy" CssClass="Err" ForeColor="red" Font-Bold="True"></asp:CustomValidator>

and this for the server code:

    Private Sub cvCancel_ServerValidate(source As Object, args As ServerValidateEventArgs) Handles cvCancel.ServerValidate
        args.IsValid = True
    End Sub

and I hid the X button with:

    .rgEditForm .rgHeader a {
        display: none !important;
    }
error messages clearing now.  It's a hack, but I don't have the luxury of time to wait for maybe a solution.  
Tags
Grid
Asked by
SSirica
Top achievements
Rank 2
Iron
Iron
Veteran
Answers by
SSirica
Top achievements
Rank 2
Iron
Iron
Veteran
Share this question
or