AjaxManager and user controls

2 posts, 0 answers
  1. mro
    mro avatar
    15 posts
    Member since:
    Jun 2007

    Posted 25 Apr 2008 Link to this post

    Hello Telerik,
    Here is the problem for today:
    I have a telerik grid which is setup like this:

    1 <telerik:RadGrid ID="RadGrid1" Width="1100px" runat="server" AllowPaging="True" AllowSorting="True"  
    2             AutoGenerateColumns="False" AutoGenerateEditColumn="True" DataSourceID="ODS" 
    3             GridLines="None" Skin="Hay" OnItemCommand="RadGrid1_ItemCommand" OnItemCreated="RadGrid1_ItemCreated"
    4             <MasterTableView DataSourceID="ODS" DataKeyNames="ID,CUST_ID,ACCOUNT_ID"
    5                 <RowIndicatorColumn Visible="False"
    6                     <HeaderStyle Width="20px" /> 
    7                 </RowIndicatorColumn> 
    8                 <ExpandCollapseColumn Resizable="False" Visible="False"
    9                     <HeaderStyle Width="20px" /> 
    10                 </ExpandCollapseColumn> 
    11                 <Columns> 
    12                     <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" 
    13                         ReadOnly="True" SortExpression="ID" UniqueName="ID"
    14                     </telerik:GridBoundColumn> 
    15                     <telerik:GridBoundColumn DataField="CUST_ID" DataType="System.Int32" HeaderText="CUST_ID" 
    16                         SortExpression="CUST_ID" UniqueName="CUST_ID"
    17                     </telerik:GridBoundColumn> 
    18                     <telerik:GridBoundColumn DataField="DATE" DataType="System.DateTime" HeaderText="DATE" 
    19                         SortExpression="DATE" UniqueName="DATE"
    20                     </telerik:GridBoundColumn> 
    21                     <telerik:GridBoundColumn DataField="AMOUNT" DataType="System.Decimal" HeaderText="AMOUNT" 
    22                         SortExpression="AMOUNT" UniqueName="AMOUNT"
    23                     </telerik:GridBoundColumn> 
    24                 </Columns> 
    25                 <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UserControls/Controls_Container.ascx"  >              
    26                 </EditFormSettings> 
    27             </MasterTableView> 
    28         </telerik:RadGrid> 

    Data source is ObjectDataSource.
    The ~/UserControls/Controls_Container.ascx contains 3 controls:
    DetailsView, ASP.net gridview and Telerik grid.

    Everything works ok until i add this:

    <telerik:RadAjaxManager ID="MasterAjaxManager" runat="server">
                    <telerik:AjaxSetting AjaxControlID="RadGrid1">
                            <telerik:AjaxUpdatedControl ControlID="RadGrid1" />

    If you click "edit" and then sort 3 times you will get:
    Validation of view state MAC failed. If this app is hosted by web farm.....

    Tried to add mashine key to config, tried to add ajaxmanagerproxy to each control, then to just controls container, tried this post:
    and already spent more then 10 hours trying figure out what to do and my boss is getting nervous.
    If i do this it works:

    It even works if controls are ajaxified and grid is not. Does anybody have a solution for this or should I just remove ajax?
    Thank you,

  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 28 Apr 2008 Link to this post


    This is definitely a unique problem. I imagine that there could be some content in your Grid that is causing this built-in ASP.NET security error to be thrown. The simplest solution is obviously to disable the ASP.NET default security tool, which is not a problem if this is an intranet application. The "security" that the MAC validation provides in this case is specially trying to guard against people that manipulate your page request maliciously.

    If you do need these security items turned on, please send a simple demo app to our support system that exhibits the problem you're describing. That will be the fastest way for us to debug your setup and figure out why you're experiencing this unique problem. As a general rule, there should be no problems with what you're doing, so there must be something special about the data your rendering that's causing this problem.

    I apologize for the trouble and inconvenience and hope we can help you find  a solution quickly.

Back to Top