RadComboBox is not posting back.

2 posts, 0 answers
  1. Todd Hile-Hoffer
    Todd Hile-Hoffer avatar
    19 posts
    Member since:
    Dec 2008

    Posted 16 Oct 2009 Link to this post

    <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" 
        CodeBehind="Tolerance.aspx.cs" Inherits="GainLossSettlement.Tolerance" StylesheetTheme="Default" %> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">  
    </asp:Content> 
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">  
        <h2> 
            <span>Tolerance Percentage By Terminal / Product / Supplier</span></h2>  
        <telerik:RadScriptBlock runat="server">  
     
            <script type="text/javascript">  
                function showBottem() {  
                    document.getElementById('divContainer').style.visibility = '';  
                }  
     
                function hideBottem() {  
                    var item = document.getElementById('divContainer');  
                    item.style.visibility = 'hidden';  
                }  
            </script> 
     
        </telerik:RadScriptBlock> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="rcbTerminals">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rcbProducts" LoadingPanelID="radLoadingProducts" /> 
                        <telerik:AjaxUpdatedControl ControlID="rcbSuppliers" LoadingPanelID="RadLoadingSupplier" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                <telerik:AjaxSetting AjaxControlID="rcbProducts">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rcbSuppliers" LoadingPanelID="RadLoadingSupplier" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
        <br /> 
        <div class="clear">  
        </div> 
        <label class="controlLabel">  
            Terminal<span class="small">Select Terminal</span></label>  
        <telerik:RadComboBox ID="rcbTerminals" runat="server" Skin="WebBlue" LoadingMessage="Loading..." 
            MarkFirstMatch="true" EnableLoadOnDemand="true" AutoPostBack="True" OnSelectedIndexChanged="rcbTerminals_SelectedIndexChanged" 
            Width="17em" CssClass="radControl">  
        </telerik:RadComboBox> 
        <div class="clear">  
        </div> 
        <label class="controlLabel">  
            Product<span class="small">Select Product</span></label>  
        <telerik:RadComboBox ID="rcbProducts" runat="server" Skin="WebBlue" LoadingMessage="Loading..." 
            MarkFirstMatch="true" EnableLoadOnDemand="true" Width="17em" CssClass="controlLabel" 
            AutoPostBack="True" OnSelectedIndexChanged="rcbProducts_SelectedIndexChanged">  
        </telerik:RadComboBox> 
        <telerik:RadAjaxLoadingPanel ID="radLoadingProducts" runat="server" IsSticky="True" 
            MinDisplayTime="1000" CssClass="small">  
            <asp:Image ID="loading" runat="server" ImageUrl="~/App_Themes/Default/Images/Web20.gif" 
                Height="18px" Width="18px" />Loading...  
        </telerik:RadAjaxLoadingPanel> 
        <div class="clear">  
        </div> 
        <label class="controlLabel">  
            Supplier<span class="small">Select Supplier</span></label>  
        <telerik:RadComboBox ID="rcbSuppliers" runat="server" Skin="WebBlue" 
            MarkFirstMatch="true"  Width="17em" CssClass="controlLabel" 
            AutoPostBack="True" OnSelectedIndexChanged="rcbSuppliers_SelectedIndexChanged">  
        </telerik:RadComboBox> 
        <telerik:RadAjaxLoadingPanel ID="RadLoadingSupplier" runat="server" IsSticky="True" 
            MinDisplayTime="1000" CssClass="small">  
            <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Default/Images/Web20.gif" 
                Height="18px" Width="18px" />Loading...  
        </telerik:RadAjaxLoadingPanel> 
        <br /> 
        <div class="clear">  
        </div> 
        <br />   
            <div id="divContainer" class="divContainer">  
                <fieldset> 
                    <legend title="Tolerance Rate">Current Tolerance Rate</legend> 
                    <div class="divPaddedContainer">  
                        <label class="controlLabel">  
                            Rate:</label><asp:Label ID="lblCurrentRate" runat="server"></asp:Label> 
                        <asp:Label ID="lblIsDefault" runat="server" Text="*"></asp:Label> 
                        <div class="clear">  
                        </div> 
                        <label class="controlLabel">  
                            Effective As Of:</label><asp:Label ID="lblEffectiveDate" runat="server"></asp:Label><div 
                                class="clear">  
                            </div> 
                    </div> 
                </fieldset> 
                <br /> 
                <br /> 
                <fieldset> 
                    <legend title="New Tolerance Rate">New Tolerance Rate</legend> 
                    <div class="divPaddedContainer">  
                        <label class="controlLabel">  
                            Rate:</label> 
                        <telerik:RadNumericTextBox ID="rtbNewRate" runat="server" Width="8em" Skin="WebBlue">  
                            <NumberFormat DecimalDigits="4" GroupSeparator="" /> 
                        </telerik:RadNumericTextBox> 
                        <asp:CheckBox ID="cbNewDefault" runat="server" Text="Use Default Rate"></asp:CheckBox> 
                        <div class="clear">  
                        </div> 
                        <label class="controlLabel">  
                            Effective Date:  
                        </label> 
                        <telerik:RadDatePicker ID="rdpNewEffectiveDate" runat="server" Skin="Web20" Width="8em">  
                            <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x" 
                                Skin="Web20">  
                            </Calendar> 
                            <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                        </telerik:RadDatePicker> 
                        <div class="clear">  
                        </div> 
                    </div> 
                </fieldset> 
                <br /> 
                <br /> 
                <span>*</span><span class="smallInline"> Default Tolerance</span> 
            </div>   
        <div class="clear">  
        </div> 
    </asp:Content> 
     

    Can anyone help me figure out why rcbSuppliers is not causing a postback? When I remove the ajax manager the control works and the postback occurs. But for some reason rcbSuppliers is doing an ajax request instead of a post back. Why would this be?
  2. Martin
    Admin
    Martin avatar
    811 posts

    Posted 22 Oct 2009 Link to this post

    Hello Todd,

    I would suggest you to AJAX-ify the rcbSuppliers combobox through the RadAjaxManager. Then you can wire the OnRequestStart client-side event and check which combobox triggers the callback. The callback can be replaced with a postback if you set eventArgs.set_enableAjax(false) in the OnRequestStart event handler.
    Please check the attached demo project for the details.

    I hope this helps
    Martin
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top