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

2 posts, 1 answers
  1. Barbaros Saglamtimur
    Barbaros Saglamtimur avatar
    110 posts
    Member since:
    Jul 2012

    Posted 11 May 2012 Link to this post


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

    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.
  2. Answer
    Tsvetina avatar
    2481 posts

    Posted 16 May 2012 Link to this post

    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()
        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 %>");

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

    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.
Back to Top