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

Ajax - RadGrid EditMode=

1 Answer 94 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Michael Finch
Top achievements
Rank 1
Michael Finch asked on 18 Sep 2008, 02:46 PM

I need some help with AJAX using Master Pages and the RadGrid when the EditMode="EditForms".

In my MasterPage.Master I have declared a RadAjaxManager with some AjaxSettings :

...........

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >
  <AjaxSettings>
    <telerik:AjaxSetting AjaxControlID="RadGrid1">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
      </UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="175px" MinDisplayTime="0" BackColor="ActiveBorder" Width="175px" Transparency="25"></telerik:RadAjaxLoadingPanel>

<asp:contentplaceholder id="Main" runat="server" >

</asp:contentplaceholder>

-------------------------------

In my Page.aspx i have A RadGrid control within a ContentPlaceHolder:

<

asp:Content ID="Content1" ContentPlaceHolderID="Main" runat="Server">

<

telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"ShowStatusBar="true" OnNeedDataSource="RadGrid1_NeedDataSource" AllowMultiRowSelection="true" OnUpdateCommand="RadGrid1_UpdateCommand" AllowAutomaticInserts="false" >

 <SortingSettings SortedBackColor="Azure" />
<MasterTableView GridLines="None" EditMode="EditForms" AllowMultiColumnSorting="true" CommandItemDisplay="None" DataKeyNames="Document_ID" AllowFilteringByColumn="true">

<EditFormSettings CaptionFormatString="Document Details" UserControlName="DocumentDetails.ascx" EditFormType="WebUserControl" ><EditColumn UniqueName="EditCommandColumn1"></EditColumn>
</EditFormSettings>
</MasterTableView>
</telerik:RadGrid>

</

asp:Content>

--------------------------------

in my usercontrol pageDetails.ascx I have another datagrid:

<telerik:RadGrid ID="uxRadGridAllItems" PageSize="5" AllowPaging="True"runat="server" AllowSorting="True" GridLines="None" Width="450px" OnNeedDataSource="uxRadGridAllItems_NeedDataSource" OnItemCommand="uxRadGridAllItems_ItemCommand">
</telerik:RadGrid>

----------------------------------

My objective is to only refresh the "RadGridPageDetails" when it is clicked, however the whole page appears to be posted back everytime.
i have tried adding :

<telerik:AjaxSetting AjaxControlID="Main$RadGridPageDetails">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Main$RadGridPageDetails" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>

to the master page but this appears to be overridden by the main "RadGridpage" AjaxSetting.

So, in summary if the event is triggered on the main grid "RadGridPage", then I would like the RadGridPage control on the Page.aspx to be refreshed, and if the 
"RadGridPageDetails" control in the usercontrol is clicked I would like only that grid to be refreshed. How would I go about doing this?

Thanks

1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 22 Sep 2008, 01:59 PM
Hi Michael,

In order to ajaxify via separate ajax settings the grid in the content page of your master page and the user control, consider utilizing our RadAjaxManagerProxy control. Here are a couple of examples which illustrate its usage:

http://demos.telerik.com/ASPNET/Prometheus/Ajax/Examples/Manager/MasterPage/DefaultCS.aspx
http://demos.telerik.com/ASPNET/Prometheus/Ajax/Examples/Manager/UserControl/DefaultCS.aspx

Thus you will be able to "append" declaratively the additional settings to the main RadAjaxManager settings and define your own logic for ajax updates.
 
Best regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Michael Finch
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or