This is a migrated thread and some comments may be shown as answers.
how to ajaxify a popup window in radgrid ?
1 Answer 43 Views
This is a migrated thread and some comments may be shown as answers.
Neeraj
Top achievements
Rank 1
Neeraj asked on 30 Jun 2009, 09:07 PM
I have a radgrid, which has a RadNumericTextBox  - named - rntPercentage , I have a server event OnTextChanged="rntPercentage_TextChanged". When the text changes the popup window vanishes for a couple of seconds to refresh the page - is there any way to not do this - not to flicker the popup - perhaps Ajaxify the popup ? I tried the below code but does not help.......Can Someone please guide me in the right direction ?

       <telerik:RadAjaxManagerProxy  ID="RadAjaxManager2" runat="server">  
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="gridInvLines">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="rntPercentage" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManagerProxy> 
   
        <telerik:RadAjaxPanel ID="Radajaxpanel3" runat="server" LoadingPanelID="RadAjaxLoadingPanel4">  
        <telerik:RadGrid ID="gridInvLines" AllowPaging="False" Skin="Office2007"   
        runat="server" AutoGenerateColumns="False" DataSourceID="odsInvLines"   
        GridLines="None" OnPreRender="gridInvLines_PreRender"  OnItemCommand="gridInvLines_ItemCommand" OnItemDataBound="gridInvLines_ItemDataBound" ShowFooter="True" EnableAjaxSkinRendering="true" > 
        <ClientSettings > 
         <ClientEvents OnKeyPress="disableEnterKey" OnPopUpShowing="PopUpShowing" /> 
        </ClientSettings> 
        <MasterTableView DataKeyNames="LINE_NUMBER" DataSourceID="odsInvLines" EditMode="PopUp" InsertItemDisplay="Top"  AllowAutomaticInserts="true" AllowAutomaticUpdates="true" AllowAutomaticDeletes="true"  CommandItemDisplay="Top" CommandItemSettings-AddNewRecordText="Add New Line">  
            <Columns> 
                <telerik:GridEditCommandColumn ButtonType="LinkButton" InsertText="Save" UniqueName="EditButton">  
                 <ItemStyle HorizontalAlign="Center" Width="30px" /> 
                </telerik:GridEditCommandColumn> 
              
                           
                <telerik:GridTemplateColumn UniqueName="Percentage">  
                    <EditItemTemplate> 
                        <asp:PlaceHolder ID="phPercentage" runat="server">  
                            <asp:Label ID="lblPercentage" runat="server" Text="Percentage :" /> 
                            <telerik:RadNumericTextBox ID="rntPercentage" runat="server" EnableAjaxSkinRendering="true" 
                                 Type="Percent"  OnTextChanged="rntPercentage_TextChanged" AutoPostBack="true"    /> 
                        </asp:PlaceHolder> 
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn> 
                  
                <telerik:GridTemplateColumn HeaderText="Quantity" UniqueName="QUANTITY" EditFormColumnIndex="1">  
                    <HeaderStyle Width="30px" HorizontalAlign="Center"  /> 
                    <ItemTemplate> 
                        <asp:Label runat="server" ID="lblQuantity" Text='<%# Eval("QUANTITY") %>'></asp:Label> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <telerik:RadNumericTextBox   
                                ShowSpinButtons="False" 
                                 Skin="Office2007" 
                                Type="Number" 
                                width="155px" 
                                ID="txtQuantity" 
                                runat="server"  DbValue='<%# Bind("QUANTITY") %>' InvalidStyleDuration="200" ToolTip="Only Postive Numbers Allowed"   
                                MinValue='<%#Convert.ToDecimal(ConfigurationManager.AppSettings["Qty_MinNumber"].ToString())%>' 
                                MaxValue='<%#Convert.ToDecimal(ConfigurationManager.AppSettings["Qty_MaxNumber"].ToString())%>' 
                                > 
                                <NumberFormat AllowRounding="True"   KeepNotRoundedValue="False" /> 
                            <ClientEvents OnError="checkNumber"  /> 
                            </telerik:RadNumericTextBox> 
                        <asp:RequiredFieldValidator ID="rfvQuantity" ControlToValidate="txtQuantity" ErrorMessage="Please enter Quantity" 
                            runat="server" Display="None">*</asp:RequiredFieldValidator> 
                              
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn> 
                  
                <telerik:GridTemplateColumn HeaderText="Amount" UniqueName="UNIT_SELLING_PRICE" EditFormColumnIndex="1">  
                    <HeaderStyle Width="50px" HorizontalAlign="Center"  /> 
                    <ItemStyle HorizontalAlign="Right"  /> 
                    <ItemTemplate> 
                        <asp:Label runat="server" ID="lblUnitPrice"  Text='<%# Eval("UNIT_SELLING_PRICE", "{0:C}") %>'></asp:Label> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                            <telerik:RadNumericTextBox   
                                ShowSpinButtons="False" 
                                Skin="Office2007" 
                                Type="Currency"   
                                width="155px" 
                                ID="rntUnitPrice" 
                                runat="server"  DbValue='<%# Bind("UNIT_SELLING_PRICE") %>' InvalidStyleDuration="100" 
                                MinValue='<%#Convert.ToDouble(ConfigurationManager.AppSettings["MinNumber"].ToString())%>' 
                                MaxValue='<%#Convert.ToDouble(ConfigurationManager.AppSettings["MaxNumber"].ToString())%>' 
                                > 
                                <NumberFormat AllowRounding="True"  KeepNotRoundedValue="False" /> 
                            <ClientEvents OnKeyPress="disableEnterKey"  /> 
                            </telerik:RadNumericTextBox> 
                        <asp:RequiredFieldValidator ID="rfvUNIT_SELLING_PRICE" ControlToValidate="rntUnitPrice" ErrorMessage="Please enter Amount" 
                            runat="server" Display="None" >*</asp:RequiredFieldValidator> 
                    </EditItemTemplate> 
                </telerik:GridTemplateColumn> 
              
                 <telerik:GridBoundColumn DataField="TOTAL_AMOUNT" HeaderText="Total Amount"  DataFormatString="{0:c}" ReadOnly="true" ForceExtractValue="None">  
                   <HeaderStyle Width="50px" HorizontalAlign="center" /> 
                  <ItemStyle HorizontalAlign="Right" /> 
                  <FooterStyle HorizontalAlign="Right"  /> 
              </telerik:GridBoundColumn> 
                
               <telerik:GridBoundColumn Visible="false" UniqueName="D_TOTAL_AMOUNT"  DataField="TOTAL_AMOUNT" HeaderText="Total Amount" DataType="System.Double"  ReadOnly="true" ForceExtractValue="None">  
               </telerik:GridBoundColumn> 
                 
                  <telerik:GridCheckBoxColumn DataField="TAXABLE_FLAG" DataType="System.Boolean"   HeaderText="Taxable"   
                        UniqueName="TAXABLE_FLAG" EditFormColumnIndex="1">  
                          
                      <HeaderStyle Width="50px" HorizontalAlign="Center"  /> 
                  <ItemStyle HorizontalAlign="center" Width="50px" /> 
                  
                    </telerik:GridCheckBoxColumn> 
                  
                 
                
                <telerik:GridButtonColumn   
                 confirmtext="Delete this Line?" buttontype="ImageButton" 
                    imageurl="../../images/Delete.gif" commandname="Delete" text="Delete" uniquename="DeleteColumn">  
                        <HeaderStyle Width="20px" /> 
                        <ItemStyle HorizontalAlign="Center" Width="20px" /> 
                    </telerik:GridButtonColumn > 
                  
            </Columns> 
      
       <EditFormSettings EditColumn-UpdateText="Save" EditColumn-InsertText="Save" CaptionFormatString="Invoice Line Information" ColumnNumber="2">  
                   <FormTableItemStyle Wrap="False" Width="100%"></FormTableItemStyle> 
                    <FormCaptionStyle CssClass="EditFormHeader" Width="100%"></FormCaptionStyle> 
                    <FormMainTableStyle GridLines="Horizontal" CellSpacing="0" CellPadding="3" BackColor="White" 
                        Width="100%" /> 
                    <FormTableStyle CellSpacing="0" CellPadding="2" CssClass="module" Height="110px" 
                        BackColor="White" /> 
                      <FormTableAlternatingItemStyle Wrap="False"></FormTableAlternatingItemStyle> 
       
       <PopUpSettings  Modal="true" Width="600"   /> 
       </EditFormSettings> 
        </MasterTableView> 
        <ValidationSettings CommandsToValidate="PerformInsert,Update"  /> 
                   
    </telerik:RadGrid> 
    </telerik:RadAjaxPanel>   
     <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel5"  Skin="Office2007" /> 
     
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel4" runat="server" Transparency="30" SkinID="1" BackColor="WhiteSmoke" > 
                <asp:Image ID="Image1" ImageUrl="~/images/rotating_arrow.gif" BorderWidth="0px" AlternateText="Loading" Runat="server" style="margin-top: 75px;"></asp:Image> 
            </telerik:RadAjaxLoadingPanel> 
  

1 Answer, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 03 Jul 2009, 10:43 AM
Hi Neeraj,

Try AJAXifying the entire grid instead of only the button:

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


Sincerely yours,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Neeraj
Top achievements
Rank 1
Answers by
Veli
Telerik team
Share this question
or