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

Using AjaxMgr loses AutoPostback

4 Answers 82 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Lenny_shp
Top achievements
Rank 2
Lenny_shp asked on 19 Dec 2009, 02:55 PM
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> 

4 Answers, 1 is accepted

Sort by
0
Lenny_shp
Top achievements
Rank 2
answered on 19 Dec 2009, 03:07 PM
    <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.
0
Pavlina
Telerik team
answered on 19 Dec 2009, 04:08 PM
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.
0
Lenny_shp
Top achievements
Rank 2
answered on 21 Jan 2010, 03:19 PM
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
0
Pavlina
Telerik team
answered on 26 Jan 2010, 03:56 PM
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.
Tags
Ajax
Asked by
Lenny_shp
Top achievements
Rank 2
Answers by
Lenny_shp
Top achievements
Rank 2
Pavlina
Telerik team
Share this question
or