Javascript error while transferring elements

7 posts, 0 answers
  1. SHERFUDEEN
    SHERFUDEEN  avatar
    21 posts
    Member since:
    Apr 2011

    Posted 05 Dec 2014 Link to this post

    Hi,

    We are facing a strange issue with List box recently. We have a list box in our application for assigning the users to some groups. We wrote the server transfer event for transferring the user because while transferring the user we need to check some condition in the back end. It is working fine for last 2 years. Recently when we transfer the user to the destination list box, it is giving following java script error and transferring functionality is not working. 

    "Uncaught Sys.WebForms.PageRequestManagerServerEroorException: Sys.WebForms.PageRequestManagerServerEroorException:
    511.8182 is not a valid value for Int32"

    (Attached Image)

    the value is not always 511.8182. It is variable.

    this issue is coming in Chrome browser only and in some systems only.

    We didn't update any telerik dll recently.
  2. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 08 Dec 2014 Link to this post

    Hello,

    This is an issue introduced with the latest version of the Chrome browser, the scroll position is now reported as a floating point number. Here is a link to the feedback item in our public portal, giving information when this will be fixed and the possible workarounds for the different controls affected by this change.

    Regards,
    Dimitar Terziev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. SHERFUDEEN
    SHERFUDEEN  avatar
    21 posts
    Member since:
    Apr 2011

    Posted 11 Dec 2014 in reply to Dimitar Terziev Link to this post

    Thanks for your reply.

    I added the Java script in the Master page of my application. But I am getting the error "Uncaught TypeError: Cannot read property 'prototype' of undefined ".

    I changed the code as

    $(Telerik.Web.UI.RadListBox).prototype.saveClientState =funtion(){
    // code
    }
    Now I am getting
    " Uncaught TypeError: Cannot set property 'saveClientState' of undefined (anonymous function)" Error

    How can I solve this?
  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 12 Dec 2014 Link to this post

    Hello,

    The correct syntax is the following:
    <script type="text/javascript">
            Telerik.Web.UI.RadListBox.prototype.saveClientState = function() {
                return "{" +
                            "\"isEnabled\":" + this._enabled +
                            ",\"logEntries\":" + this._logEntriesJson +
                           ",\"selectedIndices\":" + this._selectedIndicesJson +
                           ",\"checkedIndices\":" + this._checkedIndicesJson +
                           ",\"scrollPosition\":" + Math.round(this._scrollPosition) +
                       "}";
            }
    </script>  


    Regards,
    Dimitar Terziev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. SHERFUDEEN
    SHERFUDEEN  avatar
    21 posts
    Member since:
    Apr 2011

    Posted 12 Dec 2014 in reply to Dimitar Terziev Link to this post

    Hi

    I copied and pasted the code, in my page but not succeeded. 

    I placed the code after RadScriptManager, then I am getting the following error  (Capture1.png, Capture2.png)
         "UnCaught TypeError: Cannot read property 'prototype' of undefined" 

    Then I placed the code before RadScriptManager, then I am getting the following error (Capture3.png, Capture4.png)
          "UnCaught ReferenceError: Telerik is not defined" 

    Please check the attached the screenshots.

    How can I solve this?




  7. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 15 Dec 2014 Link to this post

    Hi,

    Attached is a sample page with the override applied.

    Regards,
    Dimitar Terziev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  8. SHERFUDEEN
    SHERFUDEEN  avatar
    21 posts
    Member since:
    Apr 2011

    Posted 15 Dec 2014 in reply to Dimitar Terziev Link to this post

    Hi,
    Thanks for the reply.

    Actually, I placed the code in my master page. So it is giving error if the child page doesn't contians RadListBox.

    So I fixed the issue with the following work around.

    if (Telerik.Web.UI.RadListBox != undefined) {
                    Telerik.Web.UI.RadListBox.prototype.saveClientState = function () {
                        return "{" +
                                    "\"isEnabled\":" + this._enabled +
                                    ",\"logEntries\":" + this._logEntriesJson +
                                   ",\"selectedIndices\":" + this._selectedIndicesJson +
                                   ",\"checkedIndices\":" + this._checkedIndicesJson +
                                   ",\"scrollPosition\":" + Math.round(this._scrollPosition) +
                               "}";
                    }
                }


    Thanks











     
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017