Comboxbox with checkbox inside and AJAX Update.

7 posts, 0 answers
  1. Phuc
    Phuc avatar
    47 posts
    Member since:
    Aug 2011

    Posted 11 Aug 2011 Link to this post

    Hi all,

    I am using a combobox with its items are checkboxes. When a item is checked/unchecked another combobox will be filtered data. So what is the EventName of this Action for declaring UpdatedControls as below

    <telerik:AjaxSetting AjaxControlID="cmbCheckBox" EventName="?">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="cmbFiltered" />
                    </UpdatedControls>                
                </telerik:AjaxSetting>

    Thanks for your support.
  2. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 15 Aug 2011 Link to this post

    Hello Phuc,

    You should use the "ItemChecked" server-side event:

    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadComboBox1" EventName="ItemChecked">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="Label1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>

    This event, however, is available in the latest internal build only and not in the officially released 2011.2.712.

    Regards,
    Helen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Phuc
    Phuc avatar
    47 posts
    Member since:
    Aug 2011

    Posted 16 Aug 2011 Link to this post

    Hello Helen,

    I used that for updating two controls with a strange result. When I check/uncheck an item, AJAX update is executed but the second time, a postback is executed. The third OK, the fourth postback again.

    What happened with my situation ?
    The below is my code for AjaxSetting :

    <telerik:AjaxSetting AjaxControlID="radCmbReportType" EventName="ItemChecked">
    <UpdatedControls>
       <telerik:AjaxUpdatedControl ControlID="radCmbReportType" />
       <telerik:AjaxUpdatedControl ControlID="radCmbReportCode" />
    </UpdatedControls>   
    </telerik:AjaxSetting>

    <telerik:RadComboBox runat="server" ID="radCmbReportType" Width="200px">
          <ItemTemplate>
               <asp:CheckBox runat="server" ID="CheckBox" Text='<%# DataBinder.Eval(Container, "Text") %>'
    OnCheckedChanged="ReportTypeCheckBoxItem_CheckedChanged" AutoPostBack="true"/>
          </ItemTemplate>
    </telerik:RadComboBox>
  4. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 17 Aug 2011 Link to this post

    Hi Phuc,

    Since the 2011.2.712 release we introduced the "checkboxes" property of RadComboBox.
    You may take a look at the following demo for more details:
    http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/checkboxes/defaultcs.aspx

    ItemChecked server-side event is fired when the 'checkboxes' property is set.
    Please try the code below:

    <telerik:RadAjaxManager ID="Manager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadComboBox1" EventName="ItemChecked">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Label1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
         <telerik:RadComboBox ID="RadComboBox1" runat="server" CheckBoxes="true"
            AutoPostBack="true" AllowCustomText="true"
            onitemchecked="RadComboBox1_ItemChecked">
           <Items>
               <telerik:RadComboBoxItem runat="server" Text="One" Value="One" />
               <telerik:RadComboBoxItem runat="server" Text="Two" Value="Two" />
               <telerik:RadComboBoxItem runat="server" Text="Three" Value="Three" />
           </Items>
       </telerik:RadComboBox>


    Greetings,
    Helen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  5. Phuc
    Phuc avatar
    47 posts
    Member since:
    Aug 2011

    Posted 18 Aug 2011 Link to this post

    Hi Helen,

    I have tried a test as your description but there is no Server Side Event "OnItemChecked".
    When I check/uncheck item in Combobox, no server event fired even I have created it in Code behind as below :
    <telerik:RadComboBox ID="RadComboBox1" runat="server" CheckBoxes="true"
            AutoPostBack="true" AllowCustomText="true"
            onitemchecked="RadComboBox1_ItemChecked">
           <Items>
               <telerik:RadComboBoxItem runat="server" Text="One" Value="One" />
               <telerik:RadComboBoxItem runat="server" Text="Two" Value="Two" />
               <telerik:RadComboBoxItem runat="server" Text="Three" Value="Three" />
           </Items>
       </telerik:RadComboBox>
     
    protected void RadComboBox1_ItemChecked(object sender, EventArgs e)
        {
            if (sender is Telerik.Web.UI.RadComboBox)
            {
     
            }
        }

    Do you have any ideas?

    Regards,
    Phuc PHAM
  6. Helen
    Admin
    Helen avatar
    1052 posts

    Posted 18 Aug 2011 Link to this post

    Hello Phuc,

    As I wrote you previously on 15-Aug-2011, 'ItemChecked' event is available in the latest internal build only and not in the officially released 2011.2.712.

    What is the exact version of the Telerik.Web.UI.dll that you use?

    Regards,
    Helen
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  7. Phuc
    Phuc avatar
    47 posts
    Member since:
    Aug 2011

    Posted 18 Aug 2011 Link to this post

    Hi Hellen,

    Thanks for your support.
    Do you know when this build is released ?

    Regards,
    Phuc
Back to Top