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

RadAjaxManagerProxy & Grid EnablePostBackOnRowClick

3 Answers 65 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Joe Sanders
Top achievements
Rank 1
Joe Sanders asked on 10 Mar 2010, 04:10 PM
Using Q1 2010 Beta (2010.1.216.40).

I have the following RadGrid:
<telerik:RadGrid ID="MyRadGrid" runat="server" DataSourceID="MyEntities"  
    AllowSorting="True" AllowPaging="True" AutoGenerateColumns="True" 
    OnSelectedindexChanged="Grid_SelectedIndexChanged" 
    OnItemCreated="Grid_ItemCreated"
     
    <MasterTableView DataKeyNames="Id" DataSourceID="MyEntities" CommandItemDisplay="Top" EditMode="InPlace"
        <CommandItemTemplate> 
            <telerik:RadToolBar runat="server" OnButtonClick="ToolBar_ButtonClick"
                <Items> 
                    <telerik:RadToolBarButton runat="server" Text="Add" ImageUrl="~/Icons/Add.png" Visible='<%# MyRadGrid.SelectedIndexes.Count > 0 %>' /> 
                </Items>                             
            </telerik:RadToolBar>           
        </CommandItemTemplate> 
    </MasterTableView> 
 
    <ClientSettings EnablePostBackOnRowClick="True"
        <Selecting AllowRowSelect="True" /> 
    </ClientSettings> 
</telerik:RadGrid> 

Everything works great, the RadToolBarButton is hidden until a row is selected (causing postback).  However when I add the RadAjaxManagerProxy below (this is on a page with a Master), the postback does not fire and the add button never becomes visible.

<telerik:RadAjaxManagerProxy runat="server"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="MyRadGrid"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="MyRadGrid" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings>            
</telerik:RadAjaxManagerProxy> 

Any suggestions would be apreciated.
Thanks,
Joe


3 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 10 Mar 2010, 08:50 PM
Do you have a RadAjaxManager control on the master page? The RadAjaxManagerProxy requires a RadAjaxManager control to exist in the master page.
0
Joe Sanders
Top achievements
Rank 1
answered on 10 Mar 2010, 09:00 PM
Yes, the master page starts off with the following:

<form id="MyForm" runat="server"
<telerik:RadScriptManager ID="ScriptManager" runat="server" /> 
<telerik:RadFormDecorator ID="FormDecorator" runat="server" /> 
<telerik:RadAjaxManager ID="AjaxManager" runat="server" /> 

Also, everything works properly when its inside of an ASP.net Update Panel.

Thanks,
Joe
0
Pavel
Telerik team
answered on 11 Mar 2010, 09:17 AM
Hi Joe,

The problem is most probably related to the fact that your application is running on the 4.0 version of the .Net Framework. Unfortunately RadAjaxManager does not work in Master/Content pages scenarios with the publicly available version of the framework due to a bug in it. You can read more details about this issue in this forum thread. To workaround it I can suggest to set the ClientIDMode of the page to "AutoID".

I can also inform you that the issue is fixed by Microsoft and everything should work for the final release of VS2010 and .Net 4.0.

Sincerely yours,
Pavel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Ajax
Asked by
Joe Sanders
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Joe Sanders
Top achievements
Rank 1
Pavel
Telerik team
Share this question
or