Problems in clicking on a date

2 posts, 0 answers
  1. Carlos Marchi
    Carlos Marchi avatar
    21 posts
    Member since:
    Sep 2009

    Posted 17 Feb 2010 Link to this post

    Hi Everybody,

    I've tryied to solve a problem involving radcalendar and ajaxpanel where up to now I didnt know how to solve this problem. I'm going to explain the scenario...

    There is a page where there are two panels. First panel,  there are a radcalendar with a button. On second panel, there are  two listboxes, two, buttons, radgridview...

    the problem is... On second panel, there is a cancel button. When the user clicks on this button it is setted visible true for first panel and visible false for second panel. Then the user can edit the dates that he/she selected.. The problem is after the ser clicks on cancel button, the radcalender doesnt permit the user clicks nothing date, like the date arent enables...
     
    Then I had an idea two move the ajaxpanel another place and then the user can know how to edit them, however, when the user clicks on cancel buttons the controls that be inside on first painl dont show to user...

    This happends because the first painle is outside the ajaxpanel just second panel is inside it.

    How Can i show the controls of first panel ??

    the following code that I wrote...

    <table class="MarginTopConteudo" cellspacing="0" cellpadding="0" width="740" align="center" 
                                            border="0">  
                                            <tr> 
                                                <td class="cadmsg">  
                                                    <asp:ValidationSummary ID="ValidationSummary2" runat="server" DisplayMode="List" /> 
                                                    <asp:Label ID="lblMensagem" runat="server" Text="Label" Visible="false" CssClass="cadlbl"></asp:Label> 
                                                </td> 
                                            </tr> 
                                            <tr> 
                                                <td style="padding-top:10px; padding-bottom:20px;">                                                      
                                                            <asp:Panel ID="pnlData" runat="server">                              
                                                                                                                
                                                            <table width="740" cellspacing="0" cellpadding="0" align="center" border="0">  
                                                                <tr> 
                                                                    <td align="right" width="500">  
                                                                        <telerik:RadCalendar ID="clrPeriodoEscala" runat="server" Font-Names="Arial,Verdana,Tahoma" 
                                                                            ForeColor="Black" Style="border-color: #ececec" EnableViewSelector="true"   
                                                                            CultureInfo="Portuguese (Brazil)" FocusedDate="2009-11-11"   
                                                                            RangeMinDate="2009-11-11" SelectedDate="" Skin="Web20"   
                                                                            FastNavigationNextImage="/Web20/Calendar/fastNavRight.gif"   
                                                                            FastNavigationPrevImage="/Web20/Calendar/fastNavLeft.gif"   
                                                                            NavigationNextImage="/Web20/Calendar/arrowRight.gif"   
                                                                            NavigationPrevImage="/Web20/Calendar/arrowLeft.gif">  
                                                                            <DisabledDayStyle CssClass="calendarHolidays" /> 
                                                                        </telerik:RadCalendar> 
                                                                    </td> 
                                                                    <td class="cadlbl" align="left" width="240" valign="bottom" style="padding-left:20px; padding-bottom:0px;">      
                                                                        <asp:Button ID="btnCriarEscala" runat="server" CssClass="cadbutton100" Text="Criar Escala" OnClick="btnCriarEscala_Click"/>                                                      
                                                                    </td>                                                                                                                                                                                             
                                                                </tr>                                                                                                                                                                      
                                                            </table>                                                      
                                                        </asp:Panel> 
                                                                                                          <rada:RadAjaxPanel ID="RadAjaxPanel2" runat="server" ClientEvents-OnRequestStart="OnRequestStart" 
                                                        LoadingPanelID="lpaCadastro">     
                                                                                                                                                                 
                                                            <asp:Panel ID="pnlListHorarioColaboradores" runat="server"></asp:Panel> 
                                                            <asp:HiddenField ID="txtHiddenColaboradores" runat="server" /> 
                                                          
                                                             
                                                            <asp:Panel ID="pnlHoraColaborador" runat="server">   
                                                                                                                                                                  
                                                                <table width="740" cellspacing="0" cellpadding="0" align="center" style="border: 1px solid black">  
                                                                    <tr> 
                                                                        <td class="cadlbl"  width="190px" style="padding-top: 20px; padding-left:10px;">  
                                                                            <asp:Label ID="lblHorarios" runat="server" Text="Horários:"></asp:Label> 
                                                                            <asp:RequiredFieldValidator ID="rfvHorarios" runat="server" ControlToValidate="lstHorarios" 
                                                                                ErrorMessage="Campo Obrigatório: Horarios." InitialValue="0" 
                                                                                SetFocusOnError="True">*</asp:RequiredFieldValidator> 
                                                                        </td> 
                                                                        <td class="cadlbl"  width="350px"  style="padding-top: 20px;">  
                                                                            <asp:Label ID="lblColaboradores" runat="server" Text="Colaboradores:"></asp:Label> 
                                                                            <asp:RequiredFieldValidator ID="rfvColaboradores" runat="server" ControlToValidate="lstColaboradores" 
                                                                                ErrorMessage="Campo Obrigatório: Colaboradores." InitialValue="0" 
                                                                                SetFocusOnError="True">*</asp:RequiredFieldValidator> 
                                                                        </td>                                                                                                                                                                                              
                                                                    </tr> 
                                                                    <tr> 
                                                                        <td width="190px" style="padding-left:10px; padding-bottom:10px;">                                                                       
                                                                            <asp:ListBox ID="lstHorarios" runat="server" Height="250px" Width="130px" 
                                                                                CssClass="cadlstBox" SelectionMode="Single">  
                                                                            </asp:ListBox> 
                                                                        </td> 
                                                                        <td width="350px" style="padding-bottom:10px;">  
                                                                            <asp:ListBox ID="lstColaboradores" runat="server" Height="250px" Width="355px" 
                                                                                SelectionMode="Multiple" CssClass="cadlstBox"></asp:ListBox>                                                                  
                                                                        </td> 
                                                                        <td class="cadlbl" align="left" width="170px" valign="bottom" style="padding-left:10px; padding-bottom:20px;">      
                                                                              &nbsp;<asp:Button ID="btnInserir" runat="server" CssClass="cadbutton100" Text="Inserir" OnClick="btnInserir_Click"/>  
                                                                              &nbsp;  
                                                                              <asp:Button ID="btnCancelar" runat="server" CausesValidation="False" CssClass="cadbutton100" 
                                                                                   Text="Cancelar" Width="50px" OnClick="btnCancelar_Click" />                                                   
                                                                        </td>                                                                                                                                                                                             
                                                                    </tr>                                                                                                                                                                      
                                                                </table>                                             
                                                              
                                                                <table class="MarginTopConteudo" cellspacing="0" cellpadding="0" width="740" align="center" 
                                                                        style="border: 1px solid black">  
                                                                        <tr> 
                                                                            <td align="center" colspan="3" style="padding-top:20px;">  
                                                                                <!--   
                                                                                <rad:RadGrid ID="radGridHorariosColaboradores" runat="server" AllowPaging="True" AllowSorting="True" 
                                                                                    AutoGenerateColumns="False" CssClass="dtg" GridLines="None" Skin="None" Width="100%" Height="250px" 
                                                                                    OnItemCommand="radGridHorariosColaboradores_ItemCommand" OnItemDataBound="radGridHorariosColaboradores_ItemDataBound" 
                                                                                    OnNeedDataSource="radGridHorariosColaboradores_NeedDataSource">  
                                                                                    <GroupHeaderItemStyle CssClass="dtgGroupHeader"></GroupHeaderItemStyle> 
                                                                                    <GroupPanel Text="">  
                                                                                        <PanelStyle CssClass="dtgGroupPanel"></PanelStyle> 
                                                                                        <PanelItemsStyle CssClass="dtgGroupPanelItem"></PanelItemsStyle> 
                                                                                    </GroupPanel> 
                                                                                    <AlternatingItemStyle CssClass="dtgItemStyle"></AlternatingItemStyle> 
                                                                                    <ItemStyle CssClass="dtgItemStyleAlternate"></ItemStyle> 
                                                                                    <HeaderStyle CssClass="dtgHeaderStyle"></HeaderStyle> 
                                                                                    <MasterTableView> 
                                                                                        <NoRecordsTemplate> 
                                                                                            <div> 
                                                                                                <table cellpadding="0" cellspacing="0" height="250" width="100%">  
                                                                                                    <tr> 
                                                                                                        <td class="cadlbl">  
                                                                                                            <% = FrameWork.BusinessLayer.Idioma.BLIdiomas.TraduzirMensagens(FrameWork.Model.Idioma.Mensagens.CONSULTA_SEM_RETORNO) %> 
                                                                                                        </td> 
                                                                                                    </tr> 
                                                                                                </table> 
                                                                                            </div> 
                                                                                        </NoRecordsTemplate> 
                                                                                        <PagerTemplate> 
                                                                                            <table align="center" border="0" cellpadding="5" cellspacing="0" class="pag" height="15" 
                                                                                                width="100%">  
                                                                                                <tr> 
                                                                                                    <td align="center" valign="center">  
                                                                                                        <asp:Panel ID="pnlPaginaAtual" runat="server" DefaultButton="btnIr">  
                                                                                                            <asp:ImageButton ID="imgPrimeira" runat="server" CausesValidation="false" CommandArgument="First" 
                                                                                                                CommandName="Page" CssClass="pagImg" ImageUrl="~/imagens/icones/ico_setaesq.gif" /> 
                                                                                                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandArgument="First" 
                                                                                                                CommandName="Page" CssClass="pagLink" Enabled="True">Primeira</asp:LinkButton> 
                                                                                                            <asp:ImageButton ID="imgAnterior" runat="server" CausesValidation="false" CommandArgument="Prev" 
                                                                                                                CommandName="Page" CssClass="pagImg" ImageUrl="~/imagens/icones/ico_setaesq2.gif" /> 
                                                                                                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandArgument="Prev" 
                                                                                                                CommandName="Page" CssClass="pagLink" Enabled="True">Anterior</asp:LinkButton>&#160;&#160;  
                                                                                                            <asp:Label ID="Label3" runat="server" CssClass="paglbl">| Página:</asp:Label> 
                                                                                                            <cc1:FWMascara ID="FWMascara1" runat="server" AutoPostBack="False" CssClass="pagtxtbox" 
                                                                                                                Mascara="NUMERO" MaxLength="4" Text='<%# (int)(DataBinder.Eval(Container, "OwnerTableView.CurrentPageIndex")) + 1 %>' 
                                                                                                                Width="50px"></cc1:FWMascara> 
                                                                                                            <asp:Label ID="Label4" runat="server" CssClass="paglbl">de</asp:Label> 
                                                                                                            <asp:Label ID="Label6" runat="server" CssClass="paglbl" Enabled="True"><%#DataBinder.Eval(Container, "Paging.PageCount").ToString()%></asp:Label> 
                                                                                                            <asp:LinkButton ID="btnIr" runat="server" CommandName="IrPagina" CssClass="pagLink">Ir</asp:LinkButton> 
                                                                                                            <span class="paglbl">&#160;|&#160;</span> 
                                                                                                            <asp:LinkButton ID="LinkButton3" runat="server" CausesValidation="False" CommandArgument="Next" 
                                                                                                                CommandName="Page" CssClass="pagLink" Enabled="True">Próxima</asp:LinkButton> 
                                                                                                            <asp:ImageButton ID="imgProxima" runat="server" CausesValidation="false" CommandArgument="Next" 
                                                                                                                CommandName="Page" CssClass="pagImg" ImageUrl="~/imagens/icones/ico_setadir2.gif" /> 
                                                                                                            <asp:LinkButton ID="LinkButton4" runat="server" CausesValidation="False" CommandArgument="Last" 
                                                                                                                CommandName="Page" CssClass="pagLink" Enabled="True">Última</asp:LinkButton> 
                                                                                                            <asp:ImageButton ID="imgUltima" runat="server" CausesValidation="false" CommandArgument="Last" 
                                                                                                                CommandName="Page" CssClass="pagImg" ImageUrl="~/imagens/icones/ico_setadir.gif" /> 
                                                                                                        </asp:Panel> 
                                                                                                    </td> 
                                                                                                </tr> 
                                                                                            </table> 
                                                                                        </PagerTemplate> 
                                                                                        <Columns>                                                                                      
                                                                                            <rad:GridBoundColumn DataField="HorarioColaborador" HeaderText="Horários" SortExpression="HorarioColaborador" 
                                                                                                UniqueName="HorarioColaborador">  
                                                                                                <ItemStyle Width="5%"></ItemStyle> 
                                                                                            </rad:GridBoundColumn> 
                                                                                            <rad:GridBoundColumn DataField="NomesColaboradores" HeaderText="Colaboradores" SortExpression="Colaboradores" 
                                                                                                UniqueName="Colaboradores">  
                                                                                                <ItemStyle Width="25%"></ItemStyle> 
                                                                                            </rad:GridBoundColumn>                                                                        
                                                                                            <rad:GridBoundColumn DataField="CodigosColaboradores" SortExpression="CodigosColaboradores" UniqueName="CodigosColaboradores" 
                                                                                                Visible="false">                                                                                  
                                                                                            </rad:GridBoundColumn> 
                                                                                            <rad:GridTemplateColumn UniqueName="TemplateColumn" Visible="False">  
                                                                                                <ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle> 
                                                                                                <ItemTemplate> 
                                                                                                    <asp:ImageButton ID="Editar" runat="server" AlternateText="Editar" CausesValidation="False" 
                                                                                                        CommandArgument='<%# DataBinder.Eval(Container.DataItem, "IdEscalacao") %>' CommandName="Editar" 
                                                                                                        ImageUrl="%%PATH%%/imagens/icones/ico_editar.gif" ToolTip="Editar"></asp:ImageButton> 
                                                                                                </ItemTemplate> 
                                                                                            </rad:GridTemplateColumn>    
                                                                                            <rad:GridBoundColumn DataField="Bloqueado" SortExpression="Bloqueado" 
                                                                                                UniqueName="Bloqueado" Visible="false">  
                                                                                                <ItemStyle Width="5%"></ItemStyle> 
                                                                                            </rad:GridBoundColumn>                                                                                 
                                                                                        </Columns> 
                                                                                        <RowIndicatorColumn Visible="False">  
                                                                                            <HeaderStyle Width="20px" /> 
                                                                                        </RowIndicatorColumn> 
                                                                                        <ExpandCollapseColumn Resizable="False" Visible="False">  
                                                                                            <HeaderStyle Width="20px" /> 
                                                                                        </ExpandCollapseColumn> 
                                                                                    </MasterTableView> 
                                                                                </rad:RadGrid> 
                                                                                <!-- ********************* END: RADGRID ************************** --> 
                                                                            </td> 
                                                                        </tr> 
                                                                    </table>                                                              
                                                                </asp:Panel> 
                                                                <!-- ********************* END: PAINEL HORA COLABORADOR ************************** -->                              
                                                        </rada:RadAjaxPanel>                                                                                                                                                                                                   
                                                </td> 
                                            </tr> 
                                        </table>   

    Thank you so much for attention,

    Carlos
  2. Martin
    Admin
    Martin avatar
    833 posts

    Posted 22 Feb 2010 Link to this post

    Hello Carlos Marchi,

    Here is a small quote form our documentation:

    "Only controls that are inside the RadAjaxPanel will be updated via AJAX"

    Therefore to ensure than the "pnlData" panel is updated you should place it inside the RadAjaxPanel. Another option is to use the RadAjaxManager control. The following help article provides more information:

    AJAX Manager

    I hope this helps,
    Martin
    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.
Back to Top