Cant get "OnItemDataBound" To work!

4 posts, 0 answers
  1. Erik
    Erik avatar
    22 posts
    Member since:
    Apr 2009

    Posted 20 Feb 2010 Link to this post

    <telerik:RadComboBox ID="AreaOfInterestComboBox" runat="server" AutoPostBack="false" CssClass="areaOfInterestComboBox" Skin="Bazaar" EnableEmbeddedSkins="false" OnDataBound="AreaOfInterestComboBox_ItemDataBound"
        <ItemTemplate> 
            <asp:CheckBox runat="server" ID="cbCategory" Text="" AutoPostBack="false" onclick="stopPropagation(event);" /> 
            <%# DataBinder.Eval(Container, "Text") %> 
        </ItemTemplate> 
    </telerik:RadComboBox> 


    protected void AreaOfInterestComboBox_ItemDataBound(object sender, Telerik.Web.UI.RadComboBoxItemEventArgs e) 


    Cant get this to work, why? I need to be able to make the CheckBoxed Checked or unchecked in the Event OnItemDataBound, Is it possible?

    "Compiler Error Message: CS0123: No overload for 'AreaOfInterestComboBox_ItemDataBound' matches delegate 'System.EventHandler'"

    And Visual Studio can't resolva "RadComboBoxItemDataBoundEventArgs", cant use namespace Telerik.WebControls!
  2. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 21 Feb 2010 Link to this post

    You're handling DataBound, not ItemDataBound....

    Change this
    OnDataBound="AreaOfInterestComboBox_ItemDataBound"

    to this
    OnItemDataBound="AreaOfInterestComboBox_ItemDataBound"




    There doesn't appear to be a Telerik.WebControls...you should be using Telerik.Web.UI



  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Erik
    Erik avatar
    22 posts
    Member since:
    Apr 2009

    Posted 22 Feb 2010 Link to this post

    I've tried to use OnItemDataBound, but there is no trigger of that event, the page is loaded and does nog go into AreaOfInterestComboBox_OnItemDataBound, why?
  5. Steve
    Steve avatar
    1851 posts
    Member since:
    Dec 2008

    Posted 22 Feb 2010 Link to this post

    I don't see a datasource defined either which would explain why the ItemDataBound isn't firing

    Are you assigning it somewhere in the code behind, and if you are, have you tried calling the DataBind() method on the combo after that?
Back to Top