I got the exact same trouble (full reload of the page on the first postback, then ajax works fine after).
AND I FOUND A SOLUTION (that is applied to my case, but it may help telerik find the bug).
I have a repeater and a sqldatasource. In the itemtemplate of my repeater, I have a usercontrol, which contains an radajaxmanager (I got the same bug with the radajaxpanel, but NOT with the asp;updatepanel). The repeater is associated with the SQLdatasource using the DataSourceID property. There is absolutely no codebehind for this page, just a repeater, a sqldatasource, and the datasourceID to connect them together. There is not ajax on the page containing the repeater. The ajaxmanager is inside the usercontrol for its own content.
|<!-- NON WORKING CASE --> |
|<asp:Repeater ID="rptad" runat="server" DataSourceID="dsreview" > |
| <ItemTemplate> |
| <uc1:usercontrol containing the radajaxmanagerproxy> |
| </ItemTemplate> |
|<asp:SqlDataSource ID="dsreview" runat="server"> |
In this case, the first call is NOT ajax enabled, the whole page refresh, but after the first call it works fine.
I changed only this: I removed the datasourceid, and I used this codebehind to load my repeater:
| Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| If Not Page.IsPostBack Then |
| rptad.DataSource = dsreview |
| rptad.DataBind() |
| End If |
| End Sub |
Then it works.
Note that this code is changed on the ASPX page containing the ASCX, there absolutely nothing changed in the usercontrol containing the radajaxmanager.
I think that this is caused by the order in which the ajaxmanager generates its code relatively to the time where the repeater is databound. I don't know exactly when the repeater is databound when using the datasourceid property, it seems to be somewhere between the page_load and the page_prerender, but this causes the trouble.
Suggestion to telerik: Let the radajaxmanagerproxy do its job later during the page load to be sure to activate the ajax correctly even if we use the datasourceid property and let the page auto-charge itself.
I got this idea when reading the solution from Carlos that inspired me. But I can't apply its solution because my radajaxmanager is not in the same page than the one containing the control I databind. I tried to configure the radajaxmanagerproxy programatically in the prerender of my usercontrol but it did not help.
Then I will remove every datasourceid from every pages of my solution and load my data bound lists on the page_load events.