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;
}
}
}
}