Using AjaxMgr loses AutoPostback

5 posts, 0 answers
  1. Lenny_shp
    Lenny_shp avatar
    343 posts
    Member since:
    Jul 2006

    Posted 19 Dec 2009 Link to this post

    2009.3.1210.35
    I have CommandItem button on RadGrid that when selected, I would like to set the cboReport's index to -1.  
    I noticed that cboReport wasn't updating the value, so I added the RadGrid1 to cboReport in AjaxMgr.     When I did this, cboReport no longer does postback when a new item is selected.   RadGrid1 also doesn't change the text of the cboReport either.   

               <telerik:RadComboBox ID="cboReport" EmptyMessage="Select a report" runat="server" Skin="Simple"   
                        width="260px" AutoPostBack="true" Filter="Contains" MarkFirstMatch="true" AllowCustomText="false" NoWrap="true">                     
                    <Items> 
                        <telerik:RadComboBoxItem Text="" Value=""  /> 
                    </Items> 
                </telerik:RadComboBox>   

     
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings>     
                <telerik:AjaxSetting AjaxControlID="RadGrid1"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/> 
                        <telerik:AjaxUpdatedControl ControlID="cboReport" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
  2. Lenny_shp
    Lenny_shp avatar
    343 posts
    Member since:
    Jul 2006

    Posted 19 Dec 2009 Link to this post

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings>     
                <telerik:AjaxSetting AjaxControlID="cboReport"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/> 
                    </UpdatedControls> 
                </telerik:AjaxSetting>         
                <telerik:AjaxSetting AjaxControlID="RadGrid1"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="cboReport" /> 
                        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"/>                     
                    </UpdatedControls> 
                </telerik:AjaxSetting>           
            </AjaxSettings> 
        </telerik:RadAjaxManager> 
    The auto postback works after I explicitly added the cboReport to RadGrid1.
    Also I found that cboReport.SelectIndex = -1 doesn't change the value, only if I set cboReport.Text = string.empty then it works.
  3. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 19 Dec 2009 Link to this post

    Hi Leonid,

    Please try to change the AjaxSettings as shown in the code bellow and see if it works as expected:
    ASPX:
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="cboReport">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="cboReport" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

    Let me know if further assistance is needed.

    Greetings,
    Pavlina
    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.
  4. Lenny_shp
    Lenny_shp avatar
    343 posts
    Member since:
    Jul 2006

    Posted 21 Jan 2010 Link to this post

    That did not work.

    I'll continue to use the workaround:

                    cboReport.SelectedIndex = -1
                    cboReport.Text = String.Empty   'Needs to do this also or it won't reflect it on the screen
  5. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 26 Jan 2010 Link to this post

    Hello Leonid,

    In order to further track the issue, it will be best if you open a formal support ticket, and supply a small working project, demonstrating your setup, and showing the unwanted behavior. We will review it locally, and get back to you with additional information. 
     
    All the best,
    Pavlina
    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.
Back to Top