Greetings all!
I have a strange issue in my test app. The prerequisites are as follows:
1. I have an aspx page featuring a standard asp.net ajax scriptmanager control as well as my own user control.
2. The user control of mine has only two things in it: RadAjaxManagerProxy plus RadGrid. The manager proxy is configured to update the grid on any postbacks from the grid (e.g. paging or sorting).
The issue is that regular postbacks still occur when say sorting the grid. Placing the grid into an RadAjaxPanel (and removing the manager of course) fixes the issue. But why the hell doesn't it work with the manager proxy? I made sure the control IDs are correct in the manager settings. I also made sure Ajax postbacls aren't disabled in the manager.
Best regards,
Andreii
| function onRequestStart(sender, args) { |
| args.set_enableAjax(false); |
| }; |
| function ajaxRequest() { |
| var ajaxManager = $find("<%= ajaxManager.ClientID %>"); |
| ajaxManager.set_enableAjax(false); |
| } |
| protected void ajaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e) |
| { |
| ajaxManager.EnableAJAX = false; |
| // then call server side code |
| } |
| private void BindYears() |
| { |
| DateTime firstyear = DateTime.Now.AddYears(-62); |
| for (int i = 0; i > -47; i--) |
| { |
| DateTime year = firstyear.AddYears(i); |
| ddlYear.Items.Add(new ListItem(year.Year.ToString())); |
| } |
| ddlYear.SelectedIndex = 0; |
| } |
| private int Month |
| { |
| get { return Convert.ToInt32(ddlMonth.SelectedValue); } |
| set { ddlMonth.SelectedValue = value.ToString(); } |
| } |
| private int Day |
| { |
| get { return Convert.ToInt32(ddlDay.SelectedValue); } |
| set { ddlDay.SelectedValue = value.ToString(); } |
| } |
| private int Year |
| { |
| get { return Convert.ToInt32(ddlYear.SelectedValue); } |
| set { ddlYear.SelectedValue = value.ToString(); } |
| } |
| public DateTime SelectedDate |
| { |
| get |
| { |
| try |
| { |
| DateTime selecteddate = Convert.ToDateTime(Month + "/" + Day + "/" + Year); |
| return selecteddate; |
| } |
| catch |
| { |
| throw new Exception("The date you selected is not valid"); |
| } |
| } |
| set |
| { |
| try |
| { |
| Month = value.Month; |
| Day = value.Day; |
| Year = value.Year; |
| } |
| catch (Exception ex) |
| { |
| } |
| } |
| } |
| <telerik:RadListBox ID="radListBoxGroups" runat="server" |
| AllowDelete="false" |
| AllowReorder="false" |
| AllowTransfer="true" |
| AllowTransferDuplicates="false" |
| AllowTransferOnDoubleClick="true" |
| CheckBoxes="false" |
| SelectionMode="Multiple" |
| TransferMode="Move" |
| Height="300" |
| Width="180" |
| TransferToID="radListBoxGroupsSelected" |
| > |
| <ButtonSettings Position="Right" |
| RenderButtonText="false" |
| ShowDelete="false" |
| ShowReorder="false" |
| ShowTransfer="true" |
| ShowTransferAll="false" |
| VerticalAlign="Middle" /> |
| </telerik:RadListBox> |
| <telerik:RadListBox ID="radListBoxGroupsSelected" runat="server" |
| Height="300" Width="170"> |
| </telerik:RadListBox> |
| var query = from dg in _dataGroups |
| join dgi in _originalDataGroupItems on dg.ID equals dgi.ParentDataGroup.ID into sr |
| from x in sr.DefaultIfEmpty() |
| select new { DataGroupID = dg.ID, IsEnabled = x != null, DataGroupName = dg.Name }; |
| foreach (var q in query) |
| { |
| RadListBoxItem radListBoxItem=new RadListBoxItem(q.DataGroupName,q.DataGroupID.ToString()); |
| radListBoxGroups.Items.Add(radListBoxItem); |
| if (q.IsEnabled) |
| { |
| radListBoxItem.Selected = true; |
| } |
| } |