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

DropDownList change event not fire in TabStrip

1 Answer 46 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Myo
Top achievements
Rank 1
Myo asked on 30 Apr 2014, 09:20 AM
Hi,

My RoomType dropdownlist change event fire on first time page load but after come back from other tabs event not fire already. Is it because of RadAjaxManager <telerik:AjaxUpdatedControl ControlID="pnlRoomType" /> ? Can anyone give me some suggestion how to solve this problems? I would like to publish my code and screenshot. I appreciate any help.
In Script

<script type="text/javascript" id='GlobalValueSetup'>
           
            $telerik.$(function () {
                var txtRemarks = $telerik.$('#ctl00_ContentPlaceHolderMain_txtRemark').val();
                if (txtRemarks !== '') {
                    alert(txtRemarks);
                }
                $telerik.$('#<%=ddlRoomType.ClientID %>').unbind('change').bind('change', OnddlRoomTypeSelectedIndexChange);
            });  
function OnddlRoomTypeSelectedIndexChange() {
    var ddlRoomType = $telerik.$('#' + GlobalObjectControls.DllRoomTypeID);
    if (isDonotMoveChecked == false) {
        ChangeRoomType(GlobalObjectControls.RoomTypeKey, ddlRoomType.val(), '', null, null);
    }
    else {
        ddlRoomType.val(GlobalObjectControls.RoomTypeKey);
        alert('Do not move has been set');
    }
}
        </script>
    </telerik:RadCodeBlock>



In .ASPX

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnablePageHeadUpdate="false">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grdGrpRoomTypeIno" />
                        <telerik:AjaxUpdatedControl ControlID="pnlRoomType" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="radTabStripSelection">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="radTabStripSelection" />               <telerik:AjaxUpdatedControl ControlID="pnlRoomType" />                          
                                        
                    </UpdatedControls>
                </telerik:AjaxSetting>    
                
            </AjaxSettings>
            <ClientEvents OnRequestStart ="$telerik.$.blockUI" OnResponseEnd="$telerik.$.unblockUI" />
        </telerik:RadAjaxManager>

<div id="pnlRoomType" runat="server" class="divRow">
                                                <asp:DropDownList ID="ddlRoomType" runat="server" Width="75%" Font-Size="11px">
                                                </asp:DropDownList>
                                                <input id="btnRoomType" name="btnRoomType" value="..." onclick="return popupRoomType();"
                                                       type="button" class="divbtn" style="width: 15%" />
                                            </div>

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 02 May 2014, 02:53 PM
Hi Myo,

Do you get any javascript errors? What happens if you disable the ajax:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="false" EnablePageHeadUpdate="false">

Please attach sample.

Regards,
Hristo Valyavicharski
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TabStrip
Asked by
Myo
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or