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

Ajax error - RadCombobox inside RadGrid inside Radwindow

5 Answers 162 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Hansel Eduard
Top achievements
Rank 1
Hansel Eduard asked on 16 Jun 2016, 10:53 PM

Good Afternoon,

I have a problem when i register in ajax manager a radgrid  with radcombobox edit template. The grid is inside to radwindow.

When i register the grid, the radcombobox stop works, not expand, but if i remove the ajax register in radajaxmanager all works fine but obviously the page made postback.

I appreciate the help in this issue. 

<telerik:RadGrid RenderMode="Lightweight" ID="GridProfesiones" CssClass="gridTable"  GridLines="None" AutoGenerateColumns="false" AllowSorting="false" runat="server" ShowStatusBar="true" OnNeedDataSource="GridProfesiones_NeedDataSource"
                               OnInsertCommand="GridProfesiones_InsertCommand" OnDeleteCommand="GridProfesiones_DeleteCommand">
                               <HeaderStyle CssClass="gridHead" />                               
                               <MasterTableView DataKeyNames="Cod" CommandItemDisplay="Bottom" NoMasterRecordsText="No registra profesiones" EditMode="InPlace"
                                   ItemStyle-CssClass="gridRow" AlternatingItemStyle-CssClass="gridRow">
                                   <Columns>
                                       <telerik:GridTemplateColumn UniqueName="DescripcionProfesion" HeaderText="DescripciĆ³n" HeaderStyle-Font-Size="12px">
                                           <ItemTemplate>
                                               <%# Eval("Descripcion") %>
                                           </ItemTemplate>
                                           <EditItemTemplate>
                                               <telerik:RadComboBox runat="server" EmptyMessage="Debe seleccionar un nivel educativo" ID="cmbDescripcion"  Width="100%" OnDataBinding="cmbDescripcion_DataBinding" Filter="Contains"/>                                               
                                               <asp:RequiredFieldValidator ID="fvProfesion" runat="server" ControlToValidate="cmbDescripcion" Display="Dynamic" ForeColor="Red"
                                                   ErrorMessage="El campo es requerido" ValidationGroup="validationProf"></asp:RequiredFieldValidator>                                           
                                           </EditItemTemplate>
                                       </telerik:GridTemplateColumn>
                                       <telerik:GridEditCommandColumn UniqueName="Command" HeaderText="" HeaderStyle-Width="80px" UpdateText="Confirmar" CancelText="Cancelar" EditText="Modificar" HeaderStyle-Font-Size="12px">
                                       </telerik:GridEditCommandColumn>
                                       <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Eliminar" UniqueName="EliminarC" ConfirmDialogType="RadWindow"
                                           Resizable="false" ConfirmText="ĀæEliminar ProfesiĆ³n?" HeaderText="Eliminar" HeaderStyle-Width="30px" HeaderStyle-Font-Size="12px">
                                       </telerik:GridButtonColumn>
                                   </Columns>
                                   <CommandItemTemplate>
                                       <div class="CommandLeft">
                                           <telerik:RadButton ID="btnAdd" Text="Agregar" CommandName="InitInsert" runat="server" Icon-PrimaryIconCssClass="rbAdd" />
                                       </div>
                                   </CommandItemTemplate>
                               </MasterTableView>
                           <ValidationSettings CommandsToValidate="PerformInsert,Update" EnableValidation="true" ValidationGroup="validationProf"/>
                           </telerik:RadGrid>

5 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 17 Jun 2016, 12:53 PM
Hi,

Can you please share the whole page markup including the Ajax settings and also check if any js errors appear on the page when Ajax is enabled?

Regards,
Maria Ilieva
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Hansel Eduard
Top achievements
Rank 1
answered on 20 Jun 2016, 08:14 PM

Sure!

This is the radwindow full code

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WCrearPersona.aspx.cs" Inherits="Legis.CIC.Guiones.Figuraciones.UI.Window.WCrearPersona" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title>Personas</title>
    <link href="../Style/custom.css" rel="stylesheet" />
    <link href="../Style/customWindow.css" rel="stylesheet" />
    <script src="../Scripts/scripts.js"></script>
</head>
<body>
    <form id="formCP" runat="server">
        <div>
            <telerik:RadScriptManager runat="server" ID="RadScriptManagerCP" />
            <telerik:RadAjaxManager runat="server" ID="RadAjaxManagerPersonas">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="pbSedes">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="pbSedes" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="ddNivelCargo">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="ddNivelCargo" />
                            <telerik:AjaxUpdatedControl ControlID="lvRoles" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="ddDependencia">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="ddDependencia" />
                            <telerik:AjaxUpdatedControl ControlID="lvRoles" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="GridTelefonosCP">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="GridTelefonosCP" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="GridProfesiones">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="GridProfesiones"/>
                            <telerik:AjaxUpdatedControl ControlID="lblValidatorProfesiones" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>   
                    <telerik:AjaxSetting AjaxControlID="GridEspecialidades">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="GridEspecialidades" />
                            <telerik:AjaxUpdatedControl ControlID="lblValidatorEspecialidades" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>                 
                  <telerik:AjaxSetting AjaxControlID="btnConfirmarWC">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="pnlContenidoCP" LoadingPanelID="loadingPersona" />
                            <telerik:AjaxUpdatedControl ControlID="sumaryCrearPersona" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="btnRevisar">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="pnlContenidoCP" LoadingPanelID="loadingPersona" />
                            <telerik:AjaxUpdatedControl ControlID="btnRevisar" />
                        </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            <ClientEvents OnResponseEnd="CloseRWC" />
                
            </telerik:RadAjaxManager>
 
            <telerik:RadAjaxLoadingPanel runat="server" ID="loadingPersona" Skin="Default" />
            <asp:Panel runat="server" ID="pnlContenidoCP">                      
                <asp:HiddenField runat="server" ID="hiddenCodPersona" Value="0" />
                <asp:HiddenField runat="server" ID="hiddenRolPredefinido" Value="0" />
 
                <table class="titleRow">
                    <tr>
                        <td style="width: 6px" class="ttl_left"></td>
                        <td class="ttl_mid">Personas
                        </td>
                        <td style="width: 6px" class="ttl_right"></td>
                    </tr>
                </table>
                <table class="tableContent noPadding">
                    <tr>
                        <td>Nombres:
                        </td>
                        <td>
                            <telerik:RadTextBox runat="server" ID="txtNombres" ClientEvents-OnValueChanged="mostrarGuardar"/>
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="txtNombres" ErrorMessage="Debe ingresar un Nombre" Text="*" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                        </td>
                        <td>Apellidos:
                        </td>
                        <td>
                            <telerik:RadTextBox runat="server" ID="txtApellidos"  ClientEvents-OnValueChanged="mostrarGuardar"/>
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="txtNombres" ErrorMessage="Debe ingresar un Apellido" Text="*" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>Tipo de IdentificaciĆ³n:
                        </td>
                        <td>
                            <telerik:RadDropDownList runat="server" ID="ddTipoID"  OnClientItemSelecting="mostrarGuardar"/>
                        </td>
                        <td>Numero de Identificacion:
                        </td>
                        <td>
                            <telerik:RadNumericTextBox runat="server" ID="txtIdentificacion" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" MinValue="0"  ClientEvents-OnValueChanged="mostrarGuardar"/>
                        </td>
                    </tr>
                    <tr>
                        <td>GĆ©nero:
                        </td>
                        <td>
                            <telerik:RadDropDownList runat="server" ID="ddSexo" Width="80px" OnClientItemSelecting="mostrarGuardar">
                                <Items>
                                    <telerik:DropDownListItem Text="M" Value="M" />
                                    <telerik:DropDownListItem Text="F" Value="F" />
                                </Items>
                            </telerik:RadDropDownList>
                        </td>                        
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>Nivel Cargo:
                        </td>
                        <td>
                            <telerik:RadDropDownList runat="server" ID="ddNivelCargo" OnSelectedIndexChanged="ddSelectedIndexChanged" AutoPostBack="true" OnClientItemSelecting="mostrarGuardar"/>
                        </td>
                        <td>Dependencia:
                        </td>
                        <td>
                            <telerik:RadDropDownList runat="server" ID="ddDependencia" OnSelectedIndexChanged="ddSelectedIndexChanged" AutoPostBack="true" OnClientItemSelecting="mostrarGuardar"/>
                        </td>
                    </tr>
                    <tr>
                        <td>DescripciĆ³n Cargo:
                        </td>
                        <td>
                            <telerik:RadTextBox runat="server" ID="txtDescripcionCargo"  ClientEvents-OnValueChanged="mostrarGuardar" />
                            <asp:RegularExpressionValidator Text="*" ControlToValidate="txtDescripcionCargo"  ForeColor="Red" Display="Dynamic" ValidationExpression="^[\s\S]{4,}$" runat="server" ErrorMessage="La descripciĆ³n del cargo debe tener mĆ­nimo 4 caracteres"></asp:RegularExpressionValidator>
                        </td>
                        <td>DescripciĆ³n Dependencia:
                        </td>
                        <td>
                            <telerik:RadTextBox runat="server" ID="txtDescripcionDependencia"  ClientEvents-OnValueChanged="mostrarGuardar"/>
                            <asp:RegularExpressionValidator Text="*" ControlToValidate="txtDescripcionDependencia" ForeColor="Red" Display="Dynamic" ValidationExpression="^[\s\S]{4,}$" runat="server" ErrorMessage="La descripciĆ³n de la dependencia debe tener mĆ­nimo 4 caracteres"></asp:RegularExpressionValidator>
                        </td>
                    </tr>
                    <tr>
 
                        <td>Nivel Educativo:
                        </td>
                        <td>
                            <telerik:RadDropDownList runat="server" ID="ddNivelEducativo" OnClientItemSelecting="mostrarGuardar" />
                             <asp:RequiredFieldValidator runat="server" ControlToValidate="ddNivelEducativo" InitialValue="No registra" ErrorMessage="Debe seleccionar un nivel educativo" Text="*" ForeColor="Red" Display="Dynamic"></asp:RequiredFieldValidator>
                        </td>
                        <td>E-Mail:
                        </td>
                        <td>
                            <telerik:RadTextBox runat="server" ID="txtEmailCP" Width="160px" ClientEvents-OnValueChanged="validarEmailCP" />
                            <br />
                            <label id="lblErrorMailCP" style="color:red; font-size:10px;"></label>
                        </td>
                    </tr>
                    <asp:Panel ID="pnlEstado" runat="server" Visible="true" >
                    <tr>                       
                        <td>
                            Estado:
                        </td>
                        <td style="color:#1f5984; ">
                            <asp:RadioButton runat="server" ID="rbEstadoA" Text="Activo" Checked="true" GroupName="grpEstado" ClientIDMode="Static"/>
                            <asp:RadioButton runat="server" ID="rbEstadoR" Text="Retirado" GroupName="grpEstado" ClientIDMode="Static" />
                        </td
                        <td colspan="2">
                            
                        </td>                                           
                    </tr>
                        </asp:Panel
                </table>
                <br />
                <telerik:RadPanelBar CssClass="collapsePanel" runat="server" EnableEmbeddedSkins="false" ID="pbSedes" ExpandAnimation-Type="InOutSine" AllowCollapseAllItems="true" Width="100%" OnClientItemExpand="imgContraer" OnClientItemCollapse="imgExpandir">
                    <Items>
                        <telerik:RadPanelItem Expanded="false" BorderStyle="None">
                            <HeaderTemplate>
                                <table class="titleRow" style="border-bottom: 1px solid #CBDAE8;">
                                    <tr>
                                        <td style="width: 6px" class="ttl_left"></td>
                                        <td class="ttl_mid">Cambiar Sede
                                        <img id="imgCollapse" src="../images/pages/ico_expandir.png" />
                                        </td>
                                        <td style="width: 6px" class="ttl_right"></td>
                                    </tr>
                                </table>
                            </HeaderTemplate>
                            <ContentTemplate>
                                <table class="tableContent noPadding" style="border-top: none">
                                    <tr>
                                        <td>Sede:
                                        </td>
                                        <td colspan="2">
                                            <telerik:RadDropDownList RenderMode="Classic" runat="server" ID="ddSedeC" DefaultMessage="Seleccione Sede..." Enabled="false" Width="350px"/>
                                        </td>
                                        <td colspan="1" style="width: 100%">
                                            <div style="float: left; margin-right: 10px">
                                                <telerik:RadButton RenderMode="Classic" runat="server" ID="btnCambiarSedeC" Skin="Silk" OnClick="btnCambiarSedeC_Click" Icon-PrimaryIconCssClass="rbEdit" Width="30px" />
                                                <telerik:RadButton RenderMode="Classic" runat="server" ID="btnConfirmarCambioS" Skin="Silk" OnClick="btnConfirmarCambio_Click" Icon-PrimaryIconCssClass="rbOk" Width="30px" Visible="false" />
                                            </div>
                                            <div style="padding-top: 8px;">
                                                <asp:Label runat="server" ForeColor="DarkRed" Text="No existen otras sedes asociadas" ID="lblNoSedeP" Visible="false" />
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>Ciudad:
                                        </td>
                                        <td>
                                            <telerik:RadTextBox runat="server" ID="txtCiudad" Enabled="false" Width="250px" />
                                        </td>
                                        <td>DirecciĆ³n:
                                        </td>
                                        <td>
                                            <telerik:RadTextBox runat="server" ID="txtDireccion" Enabled="false" Width="280px" />
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
 
                        </telerik:RadPanelItem>
                    </Items>
                </telerik:RadPanelBar>
                <br />
                <table class="titleRow">
                    <tr>
                        <td style="width: 6px" class="ttl_left"></td>
                        <td class="ttl_mid">Roles
                        </td>
                        <td style="width: 6px" class="ttl_right"></td>
                    </tr>
                </table>
                <table class="tableContent">
                    <tr>
                        <td style="padding: 0;">
                            <telerik:RadListView ID="lvRoles" runat="server" ItemPlaceholderID="RolesContainer" RenderMode="Classic" AllowPaging="false" OnNeedDataSource="lvRoles_NeedDataSource"
                                DataKeyNames="Codigo" OnItemDataBound="lvRoles_ItemDataBound">
                                <LayoutTemplate>
                                    <fieldset class="fieldRol">
                                        <asp:PlaceHolder ID="RolesContainer" runat="server"></asp:PlaceHolder>
                                    </fieldset>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <fieldset class="fieldItemRol">
                                        <asp:Image ID="imgRol" runat="server" Height="15px" ImageUrl='<%# Eval("UrlImagen") %>' Width="15px"/>
                                        <asp:CheckBox ID="chkRol" runat="server" />
                                        <br />
                                        <%# Eval("Nombre") %>
                                    </fieldset>
                                </ItemTemplate>
                            </telerik:RadListView>
                            
                        </td>
                    </tr>
                </table>
                <br />
 
                <table class="titleRow">
                    <tr>
                        <td style="width: 6px" class="ttl_left"></td>
                        <td class="ttl_mid">TelĆ©fonos
                        </td>
                        <td style="width: 6px" class="ttl_right"></td>
                    </tr>
                </table>
                <div style="font-size: 12px !important">
                    <telerik:RadGrid RenderMode="Lightweight" CssClass="gridTable" ID="GridTelefonosCP" GridLines="None" AutoGenerateColumns="false" AllowSorting="false" runat="server" Skin="Default"
                        ShowStatusBar="true" OnNeedDataSource="GridTelefonos_NeedDataSource" OnInsertCommand="GridTelefonosCP_InsertCommand" OnUpdateCommand="GridTelefonosCP_UpdateCommand" OnDeleteCommand="GridTelefonosCP_DeleteCommand" ClientSettings-ClientEvents-OnCommand="mostrarGuardar" >
 
                        <MasterTableView ShowFooter="false" DataKeyNames="Codigo" EditMode="InPlace" CommandItemDisplay="Bottom" CssClass="Columnitem" CellSpacing="0"
                            NoMasterRecordsText="No se han agregado numeros de telefono" ItemStyle-CssClass="gridRow" AlternatingItemStyle-CssClass="gridRow" >
                            <HeaderStyle CssClass="gridHead" />
                            <Columns>
                                <telerik:GridTemplateColumn UniqueName="tipoTel" HeaderText="Tipo" HeaderStyle-Font-Size="12px">
                                    <ItemTemplate>
                                        <%# Eval("Tipo") %>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadDropDownList runat="server" ID="ddTipoTelC" OnDataBinding="ddTipoTel_DataBinding">
                                        </telerik:RadDropDownList>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
 
                                <telerik:GridTemplateColumn UniqueName="numeroTel" HeaderText="NĆŗmero" HeaderStyle-Font-Size="12px">
                                    <ItemTemplate>
                                        <%# Eval("Numero") %>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadNumericTextBox runat="server" ID="txtNumeroTelC" Width="90%" Text='<%# Eval("Numero") %>' NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" MinValue="0"></telerik:RadNumericTextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="txtNumeroTelC" SetFocusOnError="false" Display="Dynamic" ValidationGroup="validationTel" ErrorMessage="Debe ingresar un numero" />
                                        <asp:CustomValidator runat="server" ID="validatorTelCP" ControlToValidate="txtNumeroTelC" EnableClientScript="false" OnServerValidate="validatorTelCP_ServerValidate" ValidationGroup="validationTel" />
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
 
                                <telerik:GridTemplateColumn UniqueName="extTel" HeaderText="ExtensiĆ³n" HeaderStyle-Font-Size="12px">
                                    <ItemTemplate>
                                        <%# !Eval("Ext").ToString().Equals("0") ? Eval("Ext") : "" %>
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <telerik:RadNumericTextBox runat="server" ID="txtExtTelC" Text='<%# !Eval("ext").ToString().Equals("0") ? Eval("Ext") : "" %>' Width="90%" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" MinValue="0"></telerik:RadNumericTextBox>
                                    </EditItemTemplate>
                                </telerik:GridTemplateColumn>
 
                                <telerik:GridEditCommandColumn UniqueName="EditarCC" HeaderText="" UpdateText="Confirmar" CancelText="Cancelar" EditText="Modificar" HeaderStyle-Font-Size="12px">
                                </telerik:GridEditCommandColumn>
 
                                <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Eliminar" UniqueName="EliminarC" ConfirmDialogType="RadWindow"
                                    Resizable="false" ConfirmText="ĀæEliminar TelĆ©fono?" HeaderText="" ColumnGroupName="Telefonos" HeaderStyle-Font-Size="12px">
                                </telerik:GridButtonColumn>
 
                            </Columns>
                            <CommandItemTemplate>
                                <div class="CommandLeft">
                                    <telerik:RadButton ID="btnAdd" Text="Agregar" CommandName="InitInsert" runat="server" Icon-PrimaryIconCssClass="rbAdd" />
                                </div>
                            </CommandItemTemplate>                           
                        </MasterTableView>
                        <ValidationSettings CommandsToValidate="PerformInsert,Update" EnableValidation="true" ValidationGroup="validationTel"/>
                        <ClientSettings EnableRowHoverStyle="true" />
                        <HeaderStyle CssClass="shortTable" />
                        <ItemStyle CssClass="shortTable" />
                    </telerik:RadGrid>
                </div>
                <br />
                <table style="border: none; font-size: 12px;">
                    <tr>
                        <td style="width: 50%; vertical-align: top;">
                            <table class="titleRow">
                                <tr>
                                    <td style="width: 6px" class="ttl_left"></td>
                                    <td class="ttl_mid">Profesiones
                                    </td>
                                    <td style="width: 6px" class="ttl_right"></td>
                                </tr>
                            </table>
 
                            <telerik:RadGrid RenderMode="Lightweight" ID="GridProfesiones" CssClass="gridTable"  GridLines="None" AutoGenerateColumns="false" AllowSorting="false" runat="server" ShowStatusBar="true" OnNeedDataSource="GridProfesiones_NeedDataSource"
                                OnInsertCommand="GridProfesiones_InsertCommand" OnDeleteCommand="GridProfesiones_DeleteCommand" ClientSettings-ClientEvents-OnCommand="mostrarGuardar">
                                <HeaderStyle CssClass="gridHead" />                               
                                <MasterTableView DataKeyNames="Cod" CommandItemDisplay="Bottom" NoMasterRecordsText="No registra profesiones" EditMode="InPlace"
                                    ItemStyle-CssClass="gridRow" AlternatingItemStyle-CssClass="gridRow">
                                    <Columns>
                                        <telerik:GridTemplateColumn UniqueName="DescripcionProfesion" HeaderText="DescripciĆ³n" HeaderStyle-Font-Size="12px">
                                            <ItemTemplate>
                                                <%# Eval("Descripcion") %>
                                            </ItemTemplate>
                                            <InsertItemTemplate>
                                                <telerik:RadDropDownList runat="server" DefaultMessage="Seleccione.." ID="ddDescripcionProfesiones" Width="100%" OnDataBinding="ddDescripcionProfesiones_DataBinding" ExpandDirection="Up" ></telerik:RadDropDownList>                                               
                                                <asp:RequiredFieldValidator ID="fvProfesion" runat="server" ControlToValidate="ddDescripcionProfesiones" Display="Dynamic" ForeColor="Red"
                                                    ErrorMessage="<br />El campo es requerido" ValidationGroup="validationProf"></asp:RequiredFieldValidator>                                           
                                            </InsertItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridEditCommandColumn UniqueName="Command" HeaderText="" HeaderStyle-Width="80px" UpdateText="Confirmar" CancelText="Cancelar" EditText="Modificar" HeaderStyle-Font-Size="12px">
                                        </telerik:GridEditCommandColumn>
                                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Eliminar" UniqueName="EliminarC" ConfirmDialogType="RadWindow"
                                            Resizable="false" ConfirmText="ĀæEliminar ProfesiĆ³n?" HeaderText="Eliminar" HeaderStyle-Width="30px" HeaderStyle-Font-Size="12px">
                                        </telerik:GridButtonColumn>
                                    </Columns>
                                    <CommandItemTemplate>
                                        <div class="CommandLeft">
                                            <telerik:RadButton ID="btnAdd" Text="Agregar" CommandName="InitInsert" runat="server" Icon-PrimaryIconCssClass="rbAdd" />
                                        </div>
                                    </CommandItemTemplate>
                                </MasterTableView>
                            <ValidationSettings CommandsToValidate="PerformInsert,Update" EnableValidation="true" ValidationGroup="validationProf"/>
                            </telerik:RadGrid>  
                            <asp:Label runat="server" ID="lblValidatorProfesiones" ForeColor="DarkRed" />                       
                        </td>
                        <td style="width: 50%; vertical-align: top;">
                            <table class="titleRow">
                                <tr>
                                    <td style="width: 6px" class="ttl_left"></td>
                                    <td class="ttl_mid">Especialidades
                                    </td>
                                    <td style="width: 6px" class="ttl_right"></td>
                                </tr>
                            </table>     
                           <telerik:RadGrid RenderMode="Lightweight" CssClass="gridTable" ID="GridEspecialidades" GridLines="None" AutoGenerateColumns="false" AllowSorting="false" runat="server" ShowStatusBar="true" OnNeedDataSource="GridEspecialidades_NeedDataSource"
                                OnInsertCommand="GridEspecialidades_InsertCommand" OnDeleteCommand="GridEspecialidades_DeleteCommand" ClientSettings-ClientEvents-OnCommand="mostrarGuardar" OnItemCreated="GridEspecialidades_ItemCreated">
                                <HeaderStyle CssClass="gridHead" />
                                <MasterTableView DataKeyNames="Cod" CommandItemDisplay="Bottom" NoMasterRecordsText="No registra especialidades"
                                    ItemStyle-CssClass="gridRow" AlternatingItemStyle-CssClass="gridRow" EditMode="InPlace">
                                    <Columns>
                                        <telerik:GridTemplateColumn UniqueName="Descripcion" HeaderText="DescripciĆ³n" HeaderStyle-Font-Size="12px" >
                                            <ItemTemplate>
                                                <%# Eval("Descripcion") %>
                                            </ItemTemplate>
                                            <InsertItemTemplate>
                                                <telerik:RadSearchBox runat="server" ID="schEspecialidad" EmptyMessage="Buscar..." EnableAutoComplete="true" Filter="Contains" >
                                                </telerik:RadSearchBox>
                                                <telerik:RadDropDownList runat="server" ID="ddEspecialidad" DefaultMessage="Seleccione..." Width="100%" OnDataBinding="ddEspecialidad_DataBinding" ExpandDirection="Up"></telerik:RadDropDownList>
                                                <asp:RequiredFieldValidator ID="fvEspecialidad" runat="server" ControlToValidate="ddEspecialidad" Display="Dynamic" ForeColor="Red"
                                                    ErrorMessage="<br />El campo es requerido" ValidationGroup="validationEsp"/>
                                            </InsertItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridEditCommandColumn UniqueName="Command" HeaderText="" HeaderStyle-Width="80px" UpdateText="Confirmar" CancelText="Cancelar" EditText="Modificar" HeaderStyle-Font-Size="12px"></telerik:GridEditCommandColumn>
                                        <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" Text="Eliminar" UniqueName="EliminarC" ConfirmDialogType="RadWindow"
                                            Resizable="false" ConfirmText="ĀæEliminar ProfesiĆ³n?" HeaderText="Eliminar" HeaderStyle-Width="40px" HeaderStyle-Font-Size="12px">
                                        </telerik:GridButtonColumn>
                                    </Columns>
                                    <CommandItemTemplate>
                                        <div class="CommandLeft">
                                            <telerik:RadButton ID="btnAdd" Text="Agregar" CommandName="InitInsert" runat="server" Icon-PrimaryIconCssClass="rbAdd" />
                                        </div>
                                    </CommandItemTemplate>
                                </MasterTableView>
                                <ValidationSettings CommandsToValidate="PerformInsert,Update" EnableValidation="true" ValidationGroup="validationEsp"/>
                            </telerik:RadGrid>
                            <asp:Label runat="server" ID="lblValidatorEspecialidades" ForeColor="DarkRed" />
                        </td>
                    </tr>
                </table>
                <br />
                <table style="text-align:center;">    
                    <tr>
                        <td>
                            <telerik:RadButton runat="server" ID="btnRevisar" Text="Verificar Datos" ToolTip="Actualiza la fecha de verificaciĆ³n en caso de que no hayan cambiado los datos" Icon-PrimaryIconCssClass="rbOk" OnClick="btnRevisar_Click" Width="135px"/>
                            <telerik:RadButton Text="Guardar Cambios" runat="server" ID="btnConfirmarWC" OnClick="btnConfirmarWC_Click" Icon-PrimaryIconCssClass="rbSave" Width="135px" ClientIDMode="Static"></telerik:RadButton>
                        </td>
                    </tr>   
               </table>     
                <br />
             <asp:CustomValidator ID="customValidator" runat="server" Display="None" />
                <asp:ValidationSummary runat="server" ID="sumaryCrearPersona" ShowValidationErrors="true" DisplayMode="BulletList" ShowSummary="true" CssClass="tableContent" />
 
                <asp:HiddenField runat="server" ID="hdResultadoCP" Value="0" />  
            
  </asp:Panel>
            <telerik:RadNotification RenderMode="Lightweight" ID="NotifErrorCP" runat="server" Height="200px" Width="300px"
                Animation="Fade" EnableRoundedCorners="true" EnableShadow="true" AutoCloseDelay="3500" ContentIcon="warning"
                Position="Center" ShowCloseButton="true" KeepOnMouseOver="false" Title="Error">
            </telerik:RadNotification>
        </div>
         
        <telerik:RadScriptBlock runat="server" ID="RadScriptBlockA">
            <script type="text/javascript">
                $telerik.$(document).ready(function () {
                    var res = document.getElementById('<%= hiddenCodPersona.ClientID %>');
                    var rol = document.getElementById('<%= hiddenRolPredefinido.ClientID%>');
                    if ((res.value != "0") && (rol.value == "0")) {
                        var btnGuardar = $find("btnConfirmarWC");
                        if (btnGuardar != null) {
                            btnGuardar.set_visible(false);
                        }
                    } else {
                        var btnVerificar = $find('<%=btnRevisar.ClientID%>');
                        if (btnVerificar != null) {
                            btnVerificar.set_visible(false);
                        }
                    }
                });
 
                $telerik.$("input#rbEstadoR").click(
                    function () {
                        if (!confirm("ĀæEstĆ” seguro de cambiar el estado de esta persona?")) {
                            document.getElementById("rbEstadoA").checked = true;
                        } else {
                            mostrarGuardar();
                        }
                    }
                );
 
                $telerik.$("input[type='checkbox']").change(
                    function () {
                        mostrarGuardar();
                    }
                );
 
                function mostrarGuardar(sender, args) {
                    var btnVerificar = $find('<%=btnRevisar.ClientID%>');
                    if (btnVerificar != null) {
                        btnVerificar.set_visible(false);
                    }
                    var btnGuardar = $find("btnConfirmarWC");
                    if (btnGuardar != null) {
                        btnGuardar.set_visible(true);
                    }
                }
 
                function imgExpandir() {
                    document.getElementById("imgCollapse").src = "../images/pages/ico_expandir.png";
                }
 
                function imgContraer() {
                    document.getElementById("imgCollapse").src = "../images/pages/ico_contraer.png";
                    mostrarGuardar();
                }
 
                function validarEmailCP(sender, args) {
                    var lbl = document.getElementById("lblErrorMailCP");
                    if (validarEmail(sender.get_value()) == false) {
                        lbl.innerText = "Email InvĆ”lido";
                    } else {
                        lbl.innerText = "";
                        mostrarGuardar();
                    }
                }
 
                        function CloseRWC() {
                    var res = document.getElementById('<%= hdResultadoCP.ClientID %>');
                    if (res.value != "0") {
                        if (res.value == "success") {
                            var oWnd = GetRadWindow();
                            if (oWnd) oWnd.close("success");
                        }
                        else {
                            if (res.value == "checked") {
                                var oWnd = GetRadWindow();
                                if (oWnd) oWnd.close("checked")
                            }
                        }
                    }
                }
 
            </script>
        </telerik:RadScriptBlock>
    </form>
</body>
</html>

0
Maria Ilieva
Telerik team
answered on 23 Jun 2016, 12:51 PM
Hi,

Can you please try to add the whole pnlContenidoCP to update itself in the RadAjax settings and remove all other settings and see how it goes?

Regards,
Maria Ilieva
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
Hansel Eduard
Top achievements
Rank 1
answered on 23 Jun 2016, 01:47 PM

I tried your suggestion but the issue still happening.

Thanks

0
Maria Ilieva
Telerik team
answered on 28 Jun 2016, 12:11 PM
Hello,

Inset of using document.ready try to implement the custom client logic in the client pageLoad event as document.ready does not fire when the page is ajaxified. Give this a try and see how it goes.

Regards,
Maria Ilieva
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Ajax
Asked by
Hansel Eduard
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Hansel Eduard
Top achievements
Rank 1
Share this question
or