This is a migrated thread and some comments may be shown as answers.

RadWindow.Confirm not working with DialogParameters

4 Answers 235 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 09 Feb 2017, 11:47 PM

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.

4 Answers, 1 is accepted

Sort by
0
Accepted
Dilyan Traykov
Telerik team
answered on 10 Feb 2017, 10:35 AM
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.
0
Rob Ainscough
Top achievements
Rank 1
answered on 10 Feb 2017, 04:27 PM

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

Cheers, Rob.

0
mkk09
Top achievements
Rank 1
answered on 23 Dec 2019, 02:59 PM

Hi,

Can you please tell me. In the given code how can i set IsTopmost property to true. I am suing C#.

Thanks.

0
Dinko | Tech Support Engineer
Telerik team
answered on 26 Dec 2019, 08:31 AM

Hello Muhammad,

I have already answered your question in the other forum thread. In order to avoid duplication lets continued in the other thread.

Regards,
Dinko
Progress Telerik

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.
Tags
Window
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Rob Ainscough
Top achievements
Rank 1
mkk09
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or