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

Javascript error while transferring elements

6 Answers 299 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
SHERFUDEEN
Top achievements
Rank 1
SHERFUDEEN asked on 05 Dec 2014, 01:17 PM
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.

6 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 08 Dec 2014, 08:08 AM
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.

 
0
SHERFUDEEN
Top achievements
Rank 1
answered on 11 Dec 2014, 11:13 AM
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?
0
Dimitar Terziev
Telerik team
answered on 12 Dec 2014, 08:54 AM
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.

 
0
SHERFUDEEN
Top achievements
Rank 1
answered on 12 Dec 2014, 12:14 PM
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?




0
Dimitar Terziev
Telerik team
answered on 15 Dec 2014, 09:21 AM
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.

 
0
SHERFUDEEN
Top achievements
Rank 1
answered on 15 Dec 2014, 10:19 AM
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











 
Tags
ListBox
Asked by
SHERFUDEEN
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
SHERFUDEEN
Top achievements
Rank 1
Share this question
or