Using javascript repaint

2 posts, 0 answers
  1. Kurt
    Kurt avatar
    2 posts
    Member since:
    Jun 2013

    Posted 25 Oct 2013 Link to this post


    I am trying to use the client side repaint method. But I can not seem to get it to work.  Can anyone give me the correct way to access the method?


    Part of my javascript function:

                var payeeElement = window.$find(var_radPayeeSearchClientID_fromASPX);
                payeeElement.control.repaint();



    Thanks.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Oct 2013 Link to this post

    Hi Kurt,

    Please check the following sample code I tried which works fine at my end.

    ASPX:
    <telerik:RadSearchBox ID="RadSearchBox1" runat="server" DataSourceID="SqlDataSource1"
        DataTextField="ContactName" EnableAutoComplete="true">
    </telerik:RadSearchBox>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
        SelectCommand="select ContactName from [Customers];"></asp:SqlDataSource>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Repaint" AutoPostBack="false"
        OnClientClicked="repaintSearchBox">
    </telerik:RadButton>

    JavaScript:
    <script type="text/javascript">
        function repaintSearchBox() {
            var radsearchbox = $find("<%= RadSearchBox1.ClientID%>");
            radsearchbox._element.style.width = "500px";
            radsearchbox.repaint();
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top