With a RadTextBox control, the Scrollin with Mouse Wheel is not working

6 posts, 0 answers
  1. Ricardo
    Ricardo avatar
    2 posts
    Member since:
    Feb 2009

    Posted 02 Sep 2009 Link to this post

    Scrolling. :)

    Hi, i need the vertical scrolling with a RadTextBox MultiLine and with 5 rows, this have a 250 MaxLenght and the mouse wheel scrolling is not working, do you have some idea?

    My code:

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Untitled Page</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager" runat="server"/>    
        <div>
            <telerik:RadTextBox runat="server" ID="textboxmemo" TextMode="MultiLine" Rows="3" MaxLength="500" Width="300px">
            </telerik:RadTextBox>    
        </div>
        </form>
    </body>
    </html>

    thanks!
  2. Dimo
    Admin
    Dimo avatar
    8486 posts

    Posted 03 Sep 2009 Link to this post

    Hello Ricardo,

    Thank you for reporting this problem. We have just fixed it and changes will take effect in our next release or internal build. In the meantime, you can add the following Javascript code to the website as a workaround:

    if (typeof(Telerik) != "undefined" && typeof(Telerik.Web.UI.RadTextBox) != "undefined"
        Telerik.Web.UI.RadTextBox.prototype._onTextBoxMouseWheelHandler = function (e) 
        { 
            return true
        } 


    I have updated your Telerik points.


    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Nikolas G
    Nikolas G avatar
    11 posts
    Member since:
    Oct 2009

    Posted 13 Nov 2009 Link to this post

    Hi ,
    sorry for the silly question.

    But where exactly should I put this code in order to work for my RadTextBox??


    thnx
  4. Dimo
    Admin
    Dimo avatar
    8486 posts

    Posted 13 Nov 2009 Link to this post

    Hi Nikolas,

    You should put that Javascript code in a <script> tag in the <body> (not in the <head>), so that it is parsed after the embedded scripts in order to override them. You can alternatively add the script in an external .js file, but again, you have to register that file in the <body>.

    Sincerely yours,
    Dimo
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Nikolas G
    Nikolas G avatar
    11 posts
    Member since:
    Oct 2009

    Posted 13 Nov 2009 Link to this post

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
         
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    <html xmlns="http://www.w3.org/1999/xhtml"
    <head runat="server"
        <title></title
    </head> 
    <body> 
     
         
        <form id="form1" runat="server"
         
        <script type="text/javascript"
            if (typeof (Telerik) != "undefined" && typeof (Telerik.Web.UI.RadTextBox) != "undefined") { 
                Telerik.Web.UI.RadTextBox.prototype._onTextBoxMouseWheelHandler = function(e) { 
                    return true; 
                } 
            } </script> 
     
        <asp:ScriptManager ID="ScriptManager1" runat="server"
        </asp:ScriptManager> 
        <telerik:RadTextBox ID="RadComboBox4" runat="server" Width="150px" MaxLength="200" 
            TextMode="MultiLine"
        </telerik:RadTextBox> 
        </form> 
    </body> 
    </html> 

    This code doesn't work for me :(.

    Am I doing something wrong??
  6. Ricardo
    Ricardo avatar
    2 posts
    Member since:
    Feb 2009

    Posted 13 Nov 2009 Link to this post

    Nikolas, 

    This code does perfect work for me :)

    I put that Javascript code in a <script> tag in the <body> of my MasterPage.

     

    if (typeof(Telerik) != "undefined" && typeof(Telerik.Web.UI.RadTextBox) != "undefined")

     

    {

    Telerik.Web.UI.RadTextBox.prototype._onTextBoxMouseWheelHandler =

    function (e)

     

    {

     

    return true;

     

    }

    }

Back to Top