Exception while trying to use Prompt

2 posts, 0 answers
  1. Venu Gadde
    Venu Gadde avatar
    4 posts
    Member since:
    Dec 2009

    Posted 11 Aug 2011 Link to this post

    Hello,

    I am getting an exception when trying to use the RadWindow.Prompt. As soon as I click the button that launches the prompt window, IE throws exception. Please see code below (copied from the demos). I am using the 808 hotfix.

    Exeption details:

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E)
    Timestamp: Thu, 11 Aug 2011 15:24:41 UTC

    Message: Unhandled Error in Silverlight Application
    Code: 4004   
    Category: ManagedRuntimeError      
    Message: System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.Windows.Controls.DialogParameters.IsEqual(DialogParameters newObj)
       at Telerik.Windows.Controls.DialogParameters.op_Equality(DialogParameters one, DialogParameters two)
       at Telerik.Windows.Controls.DialogParameters.op_Inequality(DialogParameters one, DialogParameters two)
       at Telerik.Windows.Controls.RadPrompt.OnApplyTemplate()
       at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)    

    Line: 120
    Char: 13
    Code: 0
    URI: http://localhost:7067/

     

    Thank you,

    Venu Gadde.
    -------------------
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Documents;
    using System.Windows.Input;
    using System.Windows.Media;
    using System.Windows.Media.Animation;
    using System.Windows.Shapes;
    using Telerik.Windows.Controls;

    namespace Prompt
    {
        public partial class MainPage : UserControl
        {
            public MainPage()
            {
                InitializeComponent();
            }

            private void button1_Click(object sender, RoutedEventArgs e)
            {
                string promptText = "Rename employee:";
                RadWindow.Prompt(promptText, new EventHandler<WindowClosedEventArgs>(OnPromptClosed));
            }

            private void OnPromptClosed(object sender, WindowClosedEventArgs e)
            {
                RadWindow.Alert(String.Format("DialogResult: {0}, PromptResult: {1}", e.DialogResult, e.PromptResult));
                if (e.PromptResult != null && e.PromptResult != string.Empty)
                {
                    string promptResult = e.PromptResult;
                }
            }
        }
    }
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 12 Aug 2011 Link to this post

    Hi Venu,

     Thank you for contacting us. We were able to fix this problem and the fix will be included in the next internal build (this Monday).

    Kind regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

  3. DevCraft banner
Back to Top