This is a migrated thread and some comments may be shown as answers.

Comboxbox with checkbox inside and AJAX Update.

6 Answers 99 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Phuc
Top achievements
Rank 1
Phuc asked on 11 Aug 2011, 09:28 AM
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.

6 Answers, 1 is accepted

Sort by
0
Helen
Telerik team
answered on 15 Aug 2011, 02:57 PM
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.

0
Phuc
Top achievements
Rank 1
answered on 16 Aug 2011, 10:05 AM
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>
0
Helen
Telerik team
answered on 17 Aug 2011, 04:51 PM
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.

0
Phuc
Top achievements
Rank 1
answered on 18 Aug 2011, 05:21 AM
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
0
Helen
Telerik team
answered on 18 Aug 2011, 08:25 AM
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.

0
Phuc
Top achievements
Rank 1
answered on 18 Aug 2011, 11:33 AM
Hi Hellen,

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

Regards,
Phuc
Tags
ComboBox
Asked by
Phuc
Top achievements
Rank 1
Answers by
Helen
Telerik team
Phuc
Top achievements
Rank 1
Share this question
or