RadWindow.Confirm not working with DialogParameters

3 posts, 1 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    185 posts
    Member since:
    Jan 2010

    Posted 09 Feb Link to this post

    The following code produces a confirm Window but it displays the control object type name and not what I assigned to the DialogParameters

    Resulting text in Confirm Window:

    "Telerik.Windows.Controls.DialogParameters"

    Here is my code:

                Dim rWParameters As New Telerik.Windows.Controls.DialogParameters
                        With rWParameters

                            .Header = "CONFIRMATION"
                            .Content = "My message to confirm action"
                            .OkButtonContent = "Yes"
                            .CancelButtonContent = "No"
                        End With

                RadWindow.Confirm(rWParameters, AddressOf ShowConfirmationOnClosed)

     

        Private Sub ShowConfirmationOnClosed(sender As Object, e As WindowClosedEventArgs)

            Try

                If e.PromptResult = "Yes" Then
                    DoSomething()
                End If

            Catch ex As Exception

                Dim Problem As New Errors(ex)

            End Try

        End Sub

    If I do NOT use DialogParameters and just do this:

        RadWindow.Confirm("My message to confirm action", AddressOf ShowConfirmationOnClosed)

    I see the confirm Window with correct message. 

    So it looks like RadWindow.Confirm doesn't accept DialogParameters even though the sample in your documentation indicates it does or should.

    I'm using version 2016.1.112.1050 of Telerik.Windows.Controls ... I realize there is a more recent version, but no indication it fixes a problem with RadWindow.Confirm.

    Help needed ASAP, please.

    Cheers, Rob.

  2. Answer
    Dilyan Traykov
    Admin
    Dilyan Traykov avatar
    446 posts

    Posted 10 Feb Link to this post

    Hello Rob,

    The reason you're observing the described behavior is that you're using the wrong overload of the Confirm method. You can have a look at the two overloads in the following article.

    Here's how you can use the Closed EventHandler of the DialogParameters:

    Dim rWParameters As New Telerik.Windows.Controls.DialogParameters
    rWParameters.Header = "CONFIRMATION"
    rWParameters.Content = "My message to confirm action"
    rWParameters.OkButtonContent = "Yes"
    rWParameters.CancelButtonContent = "No"
    rWParameters.Closed = AddressOf ShowConfirmationOnClosed
    RadWindow.Confirm(rWParameters)

    Please let me know if this solves your issue.

    Regards,
    Dilyan Traykov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Rob Ainscough
    Rob Ainscough avatar
    185 posts
    Member since:
    Jan 2010

    Posted 10 Feb Link to this post

    Thank you, resolved ... my mis-understanding.

    Cheers, Rob.

Back to Top