RadComboBox

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    35 posts
    Member since:
    Jan 2011

    Posted 18 Jan 2013 Link to this post

    Hello Community,

    i have a Problem with OnClientBlur and OnClientFocus and i hope you can help my with that.

    In short... It doesn't work.

    Is it not the same like the html attributes  "onfocus" and "onblur"?

    <telerik:RadComboBox Width="140px" ID="rcbLaufzeit" runat="server" Skin="Web20" CssClass="left ddlisten"
        AutoPostBack="false" CloseDropDownOnBlur="true" Filter="Contains" ForeColor="#212c57"
        MarkFirstMatch="true" OnClientBlur="disableFehlerhinweis('tbLaufzeit'); hilfeTextDeaktivieren('HilfeLaufzeit');" OnClientFocus="hilfeTextAktivieren('HilfeLaufzeit');">
        <Items>
            <telerik:RadComboBoxItem runat="server" Text="Jahre" Value="1" />
            <telerik:RadComboBoxItem runat="server" Text="Monate" Value="2" />
        </Items>
    </telerik:RadComboBox>

    If you need more Informations just ask.

    Thanks for reading!

    Daniel

    Edit: Sorry for that title. I forgot to edit it :(
  2. Kevin
    Kevin avatar
    360 posts
    Member since:
    Jul 2012

    Posted 18 Jan 2013 Link to this post

    Hey Daniel,

    The problem is the way you setting the client events, as you can't set them like normal html elements. You'll need to correct it like so:

    <telerik:RadComboBox Width="140px" ID="rcbLaufzeit" runat="server" Skin="Web20" CssClass="left ddlisten"
      
        AutoPostBack="false" CloseDropDownOnBlur="true" Filter="Contains" ForeColor="#212c57"
      
        MarkFirstMatch="true" OnClientBlur="function(sender, args){disableFehlerhinweis('tbLaufzeit'); hilfeTextDeaktivieren('HilfeLaufzeit');}" OnClientFocus="function(sender, args){hilfeTextAktivieren('HilfeLaufzeit');}">
      
        <Items>
      
            <telerik:RadComboBoxItem runat="server" Text="Jahre" Value="1" />
      
            <telerik:RadComboBoxItem runat="server" Text="Monate" Value="2" />
      
        </Items>
      
    </telerik:RadComboBox>

    I hope that helps.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top