Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
110 views
The docs for RadListBox don't mention, in the client-side entries, access to the attributes collection.

--
Stuart
T. Tsonev
Telerik team
 answered on 22 Feb 2010
1 answer
154 views
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
Martin
Telerik team
 answered on 22 Feb 2010
1 answer
126 views
Issue occcurred in various versions up to 2009.3.1407.35.

Just FYI to those out there that might experience the same issue.   The issue was traced down to a few bad data value.
I have a CLOB that stores the value from RadEditor which could contain HTML, for some reason for the 2 records that is causing Sys.WebForms.PageRequestManagerParserErrorException, it seems to have some kind of control character.

When loading via RadGrid the page would fail to load (other pages are fine).
After I removed the invalid character then it loaded fine.

I have AjaxMgr on RadGrid, no update panels anywhere.

I don't know if this is more of an issue with RadEditor storing invalid character or unable to reload it back to RadGrid.
Yavor
Telerik team
 answered on 22 Feb 2010
1 answer
311 views
I have followed the examples posted at

http://www.telerik.com/help/aspnet-ajax/grdselectingrowwithclick_client.html

and also looked at the posting

http://www.telerik.com/community/forums/aspnet-ajax/grid/server-side-selecting-row-on-other-grid-page.aspx

When I submit the selected grid items, I am unable to obtain the selected values from other pages on the grid.

I have tried the following code:

           int count = RadGrid1.MasterTableView.PageCount;
            for (int i = 0; i < count; i++)
            {
                RadGrid1.CurrentPageIndex = i;
                RadGrid1.Rebind();  <--- The rebinding appears to remove all selected items.
                foreach (GridDataItem item in RadGrid1.Items)
                {
                    if (item.Selected)
                    {
                        HiddenField hdn = (HiddenField)item.FindControl("hdnFieldID");
                        int AID = int.Parse(hdn.Value);

                        // Perform action
                    }
                }
            }

If I loop through the grid it just obtains the values of the current page.

               foreach (GridDataItem item in RadGrid1.Items)
                {
                    if (item.Selected)
                    {
                        HiddenField hdn = (HiddenField)item.FindControl("hdnFieldID");
                        int AID = int.Parse(hdn.Value);

                        // Perform action
                    }
                }

How can you obtain all selected values on the RadGrid when selected rows exist on other pages?





Princy
Top achievements
Rank 2
 answered on 22 Feb 2010
1 answer
412 views
Hi,

Is it possible to return IEnumerable<T> from a method and bind this collection to radgrid?

In my scenario, I get data as IEnumerable but I do not want to persist it to the db just to bind it straight away after.


Thanks
Princy
Top achievements
Rank 2
 answered on 22 Feb 2010
3 answers
166 views
I would like to remove a column in a child table. The column to be removed depends upon the value of a certain column in the parent table. I have seen postings that show how to remove a column in the OnPreRender event but all those examples show how to remove a column in the MasterTableView. I need to remove the column in the child table.
Yavor
Telerik team
 answered on 22 Feb 2010
1 answer
89 views
Dear all,
I need to show a different context menu on a grid depending on the columns'header (I cannot rely on the column's index).
Moreover, after the selection of the corresponding menu I need to read the selected value on the grid and to apply new values on the entire column.
Any help?
Yavor
Telerik team
 answered on 22 Feb 2010
3 answers
51 views

Recently I have migrated to newer version of Telerik.Web.UI.dll (from 2008 Q3 to 2009 Q3). I use VS 2005, ASP.NET 2.0 and Asp.NET development server for local testing.

Everything looks fine besides dialogs. All buttons are disabled some reason. And files list shows blank rows (See attached image). I can select blank rows and number of black row equal number of images in the folder. All subfolders are visible as you can see. Same issue happens with all RadEditor dialogs, including: ImageEditor, Templates, etc.

I don’t fink my problem is related to redirection or URL rewriting. If I return old 2008 Q3 library version Telerik.Web.UI.dll back (simply by switching reference in the project and recompiling) all dialogs are working as expected.

What have I missed during migration to new library version? What additional stuff (comparing to old version) latest library version needs to enable dialogs?

Thank you in advance.

Denis.


Denis
Top achievements
Rank 1
 answered on 22 Feb 2010
1 answer
98 views
Hi,

How can i hide and show addnew Button in run time?

lakmal
Shinu
Top achievements
Rank 2
 answered on 22 Feb 2010
2 answers
130 views

 

 

Hi there,

I am currently building a proof of concept application for a client  and I'm trying to integrate the RadCaptcha control into a webpart I am creating for a MOSS 2007 web site, and I'm having a problem with it, being that the image for the CAPTCHA is always broken.

I have added the following to my web.config file:

<httpHandlers> 
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false" /> 
</httpHandlers> 

and:

<handlers> 
<add name="Telerik_Web_UI_WebResource_axd"  verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd"  type="Telerik.Web.UI.WebResource, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" /> 
</handlers> 

The reason I am fully qualifying the assembly name is because I am putting the Telerik DLL's in the GAC (both Telerik.Web.UI and Telerik.Web.Design - I have checked the version numbers and they match)

I am creating the RadCaptcha control in code like this:

protected override void CreateChildControls()  
{  
    // ...  
 
    RadCaptcha captcha = new RadCaptcha();  
    Controls.Add(captcha);  
 
    // ...  
} 

Any ideas why it isn't creatng the image for me? Help is appreciated

Brian Farnhill
Top achievements
Rank 1
 answered on 22 Feb 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?