ajaxify different controls for radconfirm

4 posts, 0 answers
  1. NITHIN
    NITHIN avatar
    6 posts
    Member since:
    Feb 2012

    Posted 21 Mar 2012 Link to this post

    Hi
    I am just stuck with below scenario
     Having an grid with delete template field and radconfirm when clicking on that template.and  i used ajaxrequest to ajaxify the grid during OK click on radconfirm.it works fine.My problem is i need to use another confirmation on the same page.and during OK click i need to ajaxify another control not the previous gird.How it is possible?
  2. Abhishek
    Abhishek avatar
    45 posts
    Member since:
    Jul 2012

    Posted 21 Mar 2012 Link to this post

    Hi Nithin,
    I have worked arround your issue and came up with one solution please refer the follwoing code.
    ASPX:
    <%@ Page Title="" Language="C#" MasterPageFile="~/MainStarter.Master" AutoEventWireup="true"
        CodeBehind="AjaxifyonConfirmation.aspx.cs" Inherits="LearnTelerikControls.RadAJAX.AjaxifyonConfirmation" %>
     
    <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="BodyContainer" runat="server">
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">           
                function alertCallBackFn(arg) {
                    if (arg) {                   
                        var grid = $find("<%= RadGrid1.ClientID %>");
                        LoadingPanel(grid.ClientID, true);
                    }
                }
     
                function LoadingPanel(elementId, show) {
                    var loadingPanel = $find("<%= LoadingPanel.ClientID %>");
                    if (show) {
                        loadingPanel.show(elementId);
                    }
                    else {
                        loadingPanel.hide(elementId);
                    }
                }
            </script>
        </telerik:RadCodeBlock>
     
        <telerik:RadAjaxManager ID="RadAjaxManagert" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="rgTesting">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgTesting" LoadingPanelID="LoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server">
        </telerik:RadAjaxLoadingPanel>
        <telerik:RadGrid ID="rgTesting" runat="server" GridLines="None" AllowPaging="True"
            CssClass="RadGrid" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true"
            GroupingEnabled="true" AllowFilteringByColumn="true" DataSourceID="Testfile">
            <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ID" EditMode="InPlace">
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Name" HeaderText="Name" DataField="Name" AllowFiltering="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:ImageButton ID="btnEditExternalCollaborator" runat="server" ImageUrl='<%# Telerik.Web.SkinRegistrar.GetWebResourceUrl(this,typeof(RadGrid), "Telerik.Web.UI.Skins.Office2007.Grid.Delete.gif") %>'
                                OnClientClick="radalert('You must select a grid row first before processing delete!', 330, 100,'Client RadAlert', alertCallBackFn)" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <NoRecordsTemplate>
                    No Recorsds
                </NoRecordsTemplate>
            </MasterTableView>
        </telerik:RadGrid>
        <telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None" AllowPaging="True"
            CssClass="RadGrid" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true"
            GroupingEnabled="true" AllowFilteringByColumn="true" DataSourceID="Testfile">
            <MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ID" EditMode="InPlace">
                <Columns>
                    <telerik:GridBoundColumn UniqueName="Name" HeaderText="Name" DataField="Name" AllowFiltering="true">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn>
                        <ItemTemplate>
                            <asp:ImageButton ID="btnEditExternalCollaborator" runat="server" ImageUrl='<%# Telerik.Web.SkinRegistrar.GetWebResourceUrl(this,typeof(RadGrid), "Telerik.Web.UI.Skins.Office2007.Grid.Delete.gif") %>'
                                 OnClientClick="radalert('You must select a grid row first before processing delete!', 330, 100,'Client RadAlert', alertCallBackFn)" />
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                </Columns>
                <NoRecordsTemplate>
                    No Recorsds
                </NoRecordsTemplate>
            </MasterTableView>
        </telerik:RadGrid>
        <asp:XmlDataSource ID="Testfile" runat="server" DataFile="~/XMLFiles/RadCombo.xml">
        </asp:XmlDataSource>
    </asp:Content>

    Let me know if any issue.

    Thanks,
    Abhishek K
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. NITHIN
    NITHIN avatar
    6 posts
    Member since:
    Feb 2012

    Posted 21 Mar 2012 Link to this post

    Hi..thnks for your reply.but it not meet y requirement.because i need to call onajaxrequest method in both radconfirm.and i set the ajaxification control as radajaxmanger.so every time there is call on the onajaxrequest the grid get ajaxifyed.i cnt differenate the radconfirm origin.
  5. Abhishek
    Abhishek avatar
    45 posts
    Member since:
    Jul 2012

    Posted 22 Mar 2012 Link to this post

    Hi Nithin,
    Can you please post your code, so that i can work arround your issue and try to find out the solution.
    Thanks,
    Abhsihek K
Back to Top