Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
650 views
I am trying to use a RegularExpressionValidator on a RadMaskedTextBox that is collecting a US Zip Code. I am using the following properties:

Mask="#####-#####"
DisplayMask="#########"
DisplayPromptChar=""
SelectionOnFocus="CaretToBeginning"
ResetCaretOnFocus="true"

My RegularExpression is ^((\d{5}(-|\s)\d{4})|(\d{5})$

This fails for 32608 but works for 32608-0000 when using RadMaskedTextBox

The regular expression works when I do not use a RadMaskedTextBox and fails when I do. I read that the RadInput validates against a stripped version of the Text which should validate both 32608 and 32608-0000.
Atlas
Top achievements
Rank 1
 answered on 31 Aug 2010
0 answers
116 views
Hi 
i have database update problems with two related listboxes , the errors appear when i try to move an item from the first listbox to the second (it seems like the fields value is not transferred with the item) or when i try to delete an item from the second listbox (scalar variable isn't declared error)!
Got a problem also with my ajaxpanel it dosent seem to work (the page reloads when i try to move an item)

i would liked to attach my project but it says File is not of correct type so here is the aspxpage code !

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication3._Default" %>
 
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    
     
    
     
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="200px"
        width="737px" HorizontalAlign="NotSet"
        LoadingPanelID="RadAjaxLoadingPanel1" RenderMode="Inline">
 
          
        <div style="float:left; margin-left:20px">
 
         <telerik:RadListBox
            runat="server" ID="RadListBox1"
            DataSourceID="SqlDataSource1"
            DataKeyField="mail" DataTextField="mail" DataSortField="mail" Height="200px"
            AllowTransfer="True" TransferToID="RadListBox2"
            AutoPostBackOnTransfer="True" DataValueField="mail"
                style="top: 0px; left: 0px; width: 222px" AllowAutomaticUpdates="True"
                TransferMode="Copy" />
 
 
        </div>
     
    <div style="float:left; margin-left:20px;">
     
    <telerik:RadListBox
            runat="server" ID="RadListBox2"
            DataSourceID="SqlDataSource2"
            DataKeyField="mail" DataTextField="mail" DataSortField="SortOrder"
            Width="230px" Height="200px"
            AllowReorder="True" AutoPostBackOnReorder="True"
            AllowDelete="True" AutoPostBackOnDelete="True"
            AllowAutomaticUpdates="True" DataValueField="mail"
            TransferToID="RadListBox1" />
 
     
    </div>
     
     
 
    </telerik:RadAjaxPanel>
     
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
                Skin="Default">
            </telerik:RadAjaxLoadingPanel>
     
    <asp:SqlDataSource ID="SqlDataSource1" runat="server"
        ConnectionString="<%$ ConnectionStrings:notifications_dbConnectionString %>"
        DeleteCommand="DELETE FROM [utilisateurs] WHERE [mail] = @mail"
        InsertCommand="INSERT INTO [utilisateurs] ([mail]) VALUES (@mail)"
        SelectCommand="SELECT [mail] FROM [utilisateurs]">
        <DeleteParameters>
            <asp:Parameter Name="mail" Type="String" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="mail" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server"
        ConnectionString="<%$ ConnectionStrings:notifications_dbConnectionString %>"
        DeleteCommand="DELETE FROM [presents] WHERE [mail] = @mail AND [id_plan] = @id_plan"
        InsertCommand="INSERT INTO [presents] ([mail], [id_plan]) VALUES (@mail, @id_plan)"
        SelectCommand="SELECT [mail], [id_plan] FROM [presents]">
        <DeleteParameters>
            <asp:Parameter Name="mail" Type="String" />
            <asp:Parameter Name="id_plan" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="mail" Type="String"/>
   <%--in my project the id_plan key is transferred with a link but you can do the same by adding to the current page
   adresse in the browser " ?id_plan=key" key could be 2 or 1 here --%>        
            <asp:QueryStringParameter DefaultValue="2" Name="id_plan"
                QueryStringField="id_plan" Type="Int32" />
        </InsertParameters>
         
    </asp:SqlDataSource>
     
    </form>
</body>
</html>
Hassen
Top achievements
Rank 1
 asked on 31 Aug 2010
2 answers
206 views
I see this issue in IE and not Firefox.
When I click on the export to excel button and click open (instead of Save), the excel file has a weird name 56%67%79%......xls

When I hit save it picks up the right name that i mentioned.

            MyGrid.ExportSettings.FileName = HttpUtility.UrlEncode("MyFileName", System.Text.Encoding.UTF8);

Any suggestions how to fix this. I am using 2009 Q2.

Thanks,
sayak
Top achievements
Rank 1
 answered on 31 Aug 2010
12 answers
911 views
hi
I come across some problem with the exporting. The issue is that I can't export all the record in the grid even I set "IgnorePaging"  to true; it only save the current page. The RadGrid is on a updatepanel, and the event for imagebutton click as follows

 

protected void ImgbtExcel_Click(object sender, ImageClickEventArgs e)

{

RadGridEmp.ExportSettings.ExportOnlyData =

true

 

 

RadGridEmp.ExportSettings.IgnorePaging =

true;

 

 

RadGridEmp.ExportSettings.OpenInNewWindow =

true;  

 

 

RadGridEmp.MasterTableView.ExportToExcel();

}

everytime it only save the current page.

 

 

sayak
Top achievements
Rank 1
 answered on 31 Aug 2010
4 answers
148 views
Hi there.

I am trying to implement the example http://demos.telerik.com/aspnet-ajax/rotator/examples/gallery/defaultcs.aspx but with binary images instead of normal images from directory.

Can any one help me?

Thank you in advance.
Apostolos
Top achievements
Rank 1
 answered on 31 Aug 2010
5 answers
202 views
I need to display an image based on a PK ID on a form.  All of the demos/example code seems to utilize an image within a grid (or other data-related item).  Is there any possibility of using a RadBinaryImage as a standalone control?

Thanks!
Phil
Top achievements
Rank 2
 answered on 31 Aug 2010
2 answers
315 views
Hello,

We have some RadGrids using InPlace editing and have a GridEditCommandColumn where we use ImageButtons for Edit, Update, and Cancel.  This functionality works great except I'd like to have the Cancel Button on the left and the Update button on the right (it currently defaults the other way around).  Normally this wouldn't be a big deal, but we have a Web standard in place that says all Cancel buttons should precede Save buttons.  Here's what my code for GridEditCommandColumn looks like:

<telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditImageUrl="/Common/Images/GridIcons/Edit.png" ButtonType="ImageButton" CancelImageUrl="/Common/Images/GridIcons/Cancel.png" UpdateImageUrl="/Common/Images/GridIcons/Save.png"   ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="false" ItemStyle-Width="60px" HeaderStyle-Width="60px" />

Is there a way I can change the order of the Save and Cancel buttons?  Even if there is a programmatic way in code to do this, that solution would work as well.  Thank you in advance for your reply!

Brian
Brian Levin
Top achievements
Rank 2
 answered on 31 Aug 2010
2 answers
146 views
Hello!

We have an application which is using the 2010 Q2 RadControls, which uses a multi-row RadTabStrip and the Outlook Skin (applied via a theme)
When we set the IsBreak property to "True" for one of the tabs, we get an ugly visible spacer between the two tab rows. (see attached file tabstripwithspacer.png.

Here is the code that creates this tabstrip...

<telerik:RadTabStrip ID="tsTabs" Align="Left" runat="server" Width="750px" AutoPostBack="True" ReorderTabsOnSelect="True" SelectedIndex="0" >
               <Tabs>
                   <telerik:RadTab runat="server" Text="Main" ID="tabMain" />
                   <telerik:RadTab runat="server" Text="Addresses" ID="tabAddresses" />
                   <telerik:RadTab runat="server" Text="Phones" ID="tabPhones" />
                   <telerik:RadTab runat="server" Text="Notes" ID="tabNotes" />
                   <telerik:RadTab runat="server" Text="Quotes" ID="tabQuotes" />
                   <telerik:RadTab runat="server" Text="Remarket" ID="tabRemarket" />
                   <telerik:RadTab runat="server" Text="Research" ID="tabResearch" />
                   <telerik:RadTab runat="server" Text="Groups" ID="tabGroups" IsBreak="true" />
                   <telerik:RadTab runat="server" Text="Marketing" ID="tabMarketing" />
                   <telerik:RadTab runat="server" Text="Appts" ID="tabOtherInfo" />
                   <telerik:RadTab runat="server" Text="Files" ID="tabFiles" />
                   <telerik:RadTab runat="server" Text="PreSettlement" ID="tabPreSettlement" />
                   <telerik:RadTab runat="server" Text="Perms" ID="tabPermissions" />
                   <telerik:RadTab runat="server" Text="Admin" ID="tabAdmin" />
                   <telerik:RadTab runat="server" Text="Misc Info" ID="tabImportedInfo" />
                   <telerik:RadTab runat="server" Text="FedEx" ID="tabFedEx" />
               </Tabs>
               </telerik:RadTabStrip>

When we remove the IsBreak property (using the default of false), it looks fine (see tabstripnospacer.png) - but then the Reordertabsonselect property doesn't work (the selected tab is not on the "front" row).

Is there a way for me to get the selected tab in front without seeing the spacer made by setting the IsBreak property?

Thanks!



Mike
Top achievements
Rank 1
 answered on 31 Aug 2010
2 answers
67 views
I am using the following piece of code:

 <telerik:RadFormDecorator ID="FormDecorator1" runat="server" DecoratedControls="all" EnableRoundedCorners="false"></telerik:RadFormDecorator> 

in order to update our asp .net application.  This property works great on almost all of our pages except one.  On the one page the drop down list contains around 200 pieces of data.  Therefore when the drop down arrow is pressed the entire page is filled with the drop down list.  I was wondering if there was a dropdownlistheight or something to that nature for the code mentioned above.  I found the following thread:

http://www.telerik.com/community/forums/aspnet-ajax/form-decorator/dropdownlist-height-problem-using-form-decorator.aspx

however the css "hack" did not work.  I am wondering if there was another technique or another way of fixing this problem.  I would rather not have to create a combobox for this page and would rather just use the "DecoratedControls="all" property.  

Thanks
David
Top achievements
Rank 1
 answered on 31 Aug 2010
1 answer
188 views
Hello,

I have two RadNumericTextBox on my page and a RadScriptManager. These components don't have a RequiredFieldValidator, but others on the same page have.

Theses validators are not working and it started hapenning after the inclusion of the RadNumericTextBox.

I took the RadNumeric out and the validators started working again.

Has someone ever seen a situation like this?

My code:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
    EnableScriptLocalization="True">
    </telerik:RadScriptManager>
 
    <div>
 
        <table cellpadding="0" cellspacing="0" width="100%">
     
            <tr>
                <td>  </td>
            </tr>
 
            <tr>
                <td><strong>Cadastro de educação </strong></td>
            </tr>
 
            <tr>
                <td>  </td>
            </tr>
 
            <tr>
                <td>Nome: 
                    <asp:Label ID="lblNome" runat="server" Text=""></asp:Label>
                </td>
            </tr>
 
            <tr>
                <td>  </td>
            </tr>
 
            <tr>
                <td>Tipo:  <asp:DropDownList ID="dropTipo" runat="server"
                        onselectedindexchanged="dropTipo_SelectedIndexChanged" AutoPostBack="True"
                        DataSourceID="sqlTiposEducacao" DataTextField="tipoFluxo_desc"
                        DataValueField="tipoFluxo_id">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="sqlTiposEducacao" runat="server"
                        ConnectionString="<%$ ConnectionStrings:GCConnectionString %>"
                        SelectCommand="SELECT * FROM tipofluxo WHERE tipofluxo_id >= 1 and tipofluxo_id <= 8"></asp:SqlDataSource>
                           
                    <asp:Label ID="lblEspecifique" runat="server" Text="Especifique:" Visible="false"></asp:Label
                    <asp:TextBox ID="txtEspecifique" runat="server" Width="260px" Visible="false"
                        ValidationGroup="form"></asp:TextBox>
                  
                </td>
            </tr>
 
            <tr>
                <td>  </td>
            </tr>
 
            <tr>
                <td>
                    Data de início:  <asp:TextBox ID="txtDataInicio" runat="server" ValidationGroup="form"
                        ></asp:TextBox>
                    mm/aaaa 
                    <asp:RequiredFieldValidator ID="rfvDataInicio" runat="server"
                        ControlToValidate="txtDataInicio" ErrorMessage="*" ValidationGroup="form"></asp:RequiredFieldValidator>
                    </td>
            </tr>
 
            <tr>
                <td>  </td>
            </tr>
 
            <tr>
                <td>
      Data de término:  <asp:TextBox ID="txtDataTermino" runat="server" ValidationGroup="form"
                        ></asp:TextBox>
                    mm/aaaa  <asp:RequiredFieldValidator ID="rfvDataTermino" runat="server"
                        ControlToValidate="txtDataTermino" ErrorMessage="*" ValidationGroup="form"></asp:RequiredFieldValidator>
                    </td>
            </tr>
 
            <tr>
                <td>  </td>
            </tr>
 
            <tr>
                <td>
                    Valor anual:   
                    <telerik:RadNumericTextBox ID="txtValorAnual" runat="server" Culture="pt-BR"
                        Type="Currency" Width="125px" >
                    </telerik:RadNumericTextBox>
                       
                         
                    ou Valor mensal:  
                    <telerik:RadNumericTextBox ID="txtValorMensal" runat="server" Culture="pt-BR"
                        Type="Currency" Width="125px" >
                    </telerik:RadNumericTextBox>
                       
                </td>   
            </tr>
 
            <tr>
                <td>  </td>
            </tr>
 
             <tr>
                <td align="center" class="style1">
                    <asp:LinkButton ID="btnSalvar" runat="server" Text="Salvar"
                         onclick="btnSalvar_Click" ValidationGroup="form"/>
                         
                    <asp:LinkButton ID="btnExcluir" runat="server" Text="Excluir"
                        onclick="btnExcluir_Click" />
                             
                    <asp:HyperLink ID="linkCancelar" runat="server" NavigateUrl="~/educacao.aspx">Cancelar</asp:HyperLink>
                    </td>
            </tr>
 
        </table>
 
    </div>
         
 
</asp:Content>


Tks,

Sorry for my poor english.

Thiago
Dimo
Telerik team
 answered on 31 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?