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

Microsoft JScript runtime error: Sys.InvalidOperationException: 'ıtemDeselected' is not an event.

1 Answer 32 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Barbaros Saglamtimur
Top achievements
Rank 1
Barbaros Saglamtimur asked on 11 May 2012, 02:42 PM
Hi,

When I add some client event to TreeList like;
<ClientSettings>
    <ClientEvents OnItemSelected="OnClientNodeClicked" OnItemDeselected="OnClientNodeClicked" />
</ClientSettings>

I am having this error msg;
Microsoft JScript runtime error: Sys.InvalidOperationException: 'ıtemDeselected' is not an event.

If you pay attention to event name it is "ıtemDeselected", first letter is ı (in Turkish small capital of I, dot-less i ). So when regional setting is set to Turkish, lowering "I" becomes "ı" then this exception is occured. To repro this behavior change your regional setting to Turkish from control panel (not UI culture from web.config) and test it. I hope you can fix it as soon as possible.

FYI and TIA.

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetina
Telerik team
answered on 16 May 2012, 06:44 AM
Hi Barbaros,

Indeed the described problem can be observed when the language format of the computer is set to Turkish. It seems that the web developer server of Visual Studio parses the eventName to the current culture language, therefore the function name has a turkish letter.

However, you have a several options to overcome this behaviour: 
 1) Set CurrentCulture of the application to "en-US" as shown below:
protected override void InitializeCulture()
{
    base.InitializeCulture();
 
    System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
}

2) Another possible solution is to attach the client side events of the TreeList on pageLoad using the following code:
function pageLoad() {
    var treeList = $find("<%= RadTreeList1.ClientID %>");
    treeList.add_itemDeselected(OnItemDeselected);
}

3) Additionally, if you run the application on the local IIS server you will also be able to resolve the problem.  

Regards,
Tsvetina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeList
Asked by
Barbaros Saglamtimur
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or