Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
508 views
I need to set the mask when they start to type e.g.
if they enter 4 the mask should be 16 digits split into 4 groups of 4 digits each #### #### #### #### - VISA
if they enter number 51-55 the mask should be same as above - MASTERCARD
if they enter 6011 or 65 the mask should be same with the previous two - DISCOVER
if they enter 34 or 37 the last group should be 3 character instead (15 in total) - AMEX

Thank you

EDIT: In addition, the very same regex which works for regular textbox does not work (ONLY AMEX) for Masked textbox:
<telerik:RadMaskedTextBox ID="txtCCNumber" runat="server"
        Mask="#### #### #### ####" ValidationGroup="CardValidate" />
                    <asp:RequiredFieldValidator ID="cardnumbervalidator" runat="server"
                        ControlToValidate="txtCCNumber" ErrorMessage="Card Number is Required!"
                        SetFocusOnError="True" ValidationGroup="CardValidate">!</asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="cardregvalidator" runat="server"
                        ControlToValidate="txtCCNumber" ErrorMessage="Card Number is not valid!"
                        ValidationExpression="^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7][\d\s-]{13}$" ValidationGroup="CardValidate">!</asp:RegularExpressionValidator>
Rumen
Telerik team
 answered on 08 May 2020
5 answers
275 views

It's my understanding that if I'm using Classic RenderMode, I should get the Sprite Icons on the pushbutton, if I use LightWeight rendering I should get the Kendo css images, with that being said, this took some digging to get it to this simple of an example, with the RadButton ID="btnRadButton" the icons will show the sprite image and the css image for both Classic and LightWeight rendering.  If you take the RadButton ID="btnRadButton" off the page, or set visible="false", you'll get the css images only.

Using 2020.1.114.45 Upgraded to 2020.1.219.45  same issue with the latest version

 

 

 

 

 

 

 

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="Test._Default" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptCombine="True">
        </telerik:RadScriptManager>
        <telerik:RadButton ID="btnRadButton" runat="server" Text="My Button" RenderMode="Classic"
            AutoPostBack="false" >
        </telerik:RadButton>
        <h1>Classic</h1>
        <telerik:RadPushButton ID="btnOK" runat="server" Text="OK Classic" RenderMode="Classic" >
            <Icon CssClass="rbOk" Top="6px" />
        </telerik:RadPushButton>
        <telerik:RadPushButton ID="btnSearch" runat="server" Text="Search Classic" RenderMode="Classic">
            <Icon CssClass="rbSearch" Top="6px" />
        </telerik:RadPushButton>
        <telerik:RadPushButton ID="btnCancel" runat="server" Text="Cancel Classic" RenderMode="Classic">
            <Icon CssClass="rbCancel" Top="6px" />
        </telerik:RadPushButton>
        <h1>Lightweight</h1>
        <telerik:RadPushButton ID="RadPushButton1" runat="server" Text="OK Classic" RenderMode="Lightweight" >
            <Icon CssClass="rbOk" Top="6px" />
        </telerik:RadPushButton>
        <telerik:RadPushButton ID="RadPushButton2" runat="server" Text="Search Classic" RenderMode="Lightweight">
            <Icon CssClass="rbSearch" Top="6px" />
        </telerik:RadPushButton>
        <telerik:RadPushButton ID="RadPushButton3" runat="server" Text="Cancel Classic" RenderMode="Lightweight">
            <Icon CssClass="rbCancel" Top="6px" />
        </telerik:RadPushButton>
    </form>
</body>
</html>

Rumen
Telerik team
 answered on 07 May 2020
3 answers
105 views
THis property does not seem to be available for numerictextboxes added through radinput manager. Has the property name changed or something?
Attila Antal
Telerik team
 answered on 06 May 2020
1 answer
123 views

Hi,

I am trying to build an application with a RadWizard which have 3 steps.  All 3 steps are loaded from other user controls which has numbers of fields on each.  

My questions is is it possible to get the fields values from OnActiveStepChanged and OnNextButtonClick from the code behind of the RadWizard itself?  

Thanks

Ivan

Peter Milchev
Telerik team
 answered on 06 May 2020
5 answers
667 views

Hi

 

I saw this url for EditTemplate purpose

http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/manual-crud-operations/defaultcs.aspx

 

here I canot solve this name space issue this line any one guide me

var product = new Model.ReadWrite.Product();

 

I added this name space also

System.Data.Entity.Migrations 

 

but i meet this issue 

Error 38 The type or namespace name 'Model' could not be found (are you missing a using directive or an assembly reference?) 

 

I need Edit Template For Telerikgrid using server side records binded with Crud operations

any one guide me


 

 

Eyup
Telerik team
 answered on 06 May 2020
1 answer
137 views

I would like to tie the validation trigger to a radbutton that is external to a radgrid.

Example:

<telerik:RadButton ID="btnAddStatusComplete" runat="server" Text="Complete" OnClick="btnAddStatusComplete_Click">
</telerik:RadButton>

<telerik:RadGrid ID="rgAddStatusJustify" runat="server" AutoGenerateColumns="false" AllowPaging="false" AllowFilteringByColumn="false"
                 OnBatchEditCommand="rgAddStatusJustify_BatchEditCommand"
                 OnDeleteCommand="rgAddStatusJustify_DeleteCommand" OnNeedDataSource="rgAddStatusJustify_NeedDataSource" OnItemDataBound="rgAddStatusJustify_ItemDataBound">
    <MasterTableView Width="100%" AutoGenerateColumns="false" DataKeyNames="itemName" EditMode="Batch">
      <BatchEditingSettings EditType="Cell" HighlightDeletedRows="true"/>
      <Columns>
        <telerik:GridButtonColumn CommandName="Delete" ButtonType="ImageButton" />
        <telerik:GridBoundColumn DataField="itemDescription" HeaderText="Item Description" ReadOnly="True" SortExpression="itemDescription" ItemStyle-HorizontalAlign="Left">
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="userComment" HeaderText="Justification" UniqueName="userComment">
            <ItemStyle BorderStyle="Solid" Width="200" />
            <ColumnValidationSettings EnableRequiredFieldValidation="true">
                <RequiredFieldValidator ForeColor="Red" Text="*Comment is required" Display="Dynamic"></RequiredFieldValidator>
            </ColumnValidationSettings>
        </telerik:GridBoundColumn>
      </Columns>
    </MasterTableView>
</telerik:RadGrid>

I want the userComment field filled in for all rows prior to a postback being triggered by btnAddStatusComplete_Click.  Preferably the validation text will show up once they click "Complete" but am open to other/better approaches.

Thank you

Doncho
Telerik team
 answered on 05 May 2020
0 answers
87 views

It seems after PageLoad i can not reset indicators.

Basically i want different indicators for different button clicks:

button 1: 

  RadProgressArea1.ProgressIndicators = ProgressIndicators.TotalProgress Or ProgressIndicators.TotalProgressPercent

                                                   Or ProgressIndicators.TotalProgressBar _
                                                   Or ProgressIndicators.TimeElapsed Or ProgressIndicators.TimeEstimated _
                                                   Or ProgressIndicators.CurrentFileName

buton 2:

 RadProgressArea1.ProgressIndicators = RadProgressArea1.ProgressIndicators _
                                                          And Not ProgressIndicators.SelectedFilesCount _
                                                          And Not ProgressIndicators.TotalProgressPercent _
                                                          And Not ProgressIndicators.TimeElapsed _
                                                          And Not ProgressIndicators.TimeEstimated _
                                                          And Not ProgressIndicators.TransferSpeed _
                                                          And Not ProgressIndicators.FilesCount

 

Thank you

David

David
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 05 May 2020
1 answer
119 views

Hello,

I am having an issue where users are unable to click into a RadAutoCompleteBox and enter any text. The input exists within an EditItemTemplate of a GridTemplateColumn. Previously, we were using the grids batch edit mode but switched over to InPlace so the entire row appears editable. All other controls aside from RadAutoCompleteBox work as expected.

ASPX code

<telerik:RadGrid ID="grdDeployment" runat="server"
      AllowPaging="true"
      AllowCustomPaging="true"
      AllowSorting="true"
      AutoGenerateColumns="false"
      ShowStatusBar="true"
      ClientSettings-AllowKeyboardNavigation="true"
      ClientSettings-Scrolling-AllowScroll="true"
      ClientSettings-Scrolling-UseStaticHeaders="true"
      OnPageIndexChanged="grdDeployment_PageIndexChanged"
      OnSortCommand="grdDeployment_SortCommand"
      OnItemDataBound="grdDeployment_ItemDataBound"
      OnNeedDataSource="grdDeployment_NeedDataSource"
      EnableViewState="true"
      Visible="true" >
    <MasterTableView EditMode="InPlace" AllowCustomSorting="true" AllowMultiColumnSorting="false"
      DataKeyNames="Uid, IsReferencedByContinuousResult" ClientDataKeyNames="Uid, IsReferencedByContinuousResult" >
      <Columns>
        <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn" HeaderText="" ItemStyle-Width="8%" HeaderStyle-Width="8%"></telerik:GridEditCommandColumn>
        <telerik:GridTemplateColumn HeaderText="Equipment ID*" UniqueName="EquipmentId"
                DataField="EquipmentId" HeaderStyle-Width="10%" >
              <ItemTemplate>
                <asp:Label Text='<%# Eval("EquipmentId") %>' runat="server" />
              </ItemTemplate>
          <EditItemTemplate>
                <telerik:RadAutoCompleteBox ID="acbEquipment" runat="server"
                  EnableClientFiltering="true" MinFilterLength="2" DropDownHeight="150" DropDownWidth="600px" Width="95%"
                  InputType="Text" DataValueField="Uid" DataTextField="Id" TextSettings-SelectionMode="Single" OnLoad="acbEquipment_Load">
                </telerik:RadAutoCompleteBox>
              </EditItemTemplate>
        </telerik:GridTemplateColumn>

 

Code Behind

 

protected void acbEquipment_Load (object sender, EventArgs e) {
      RadAutoCompleteBox acb = sender as RadAutoCompleteBox;
      PopulateEquipmentSelect(acb);
    }
 
private void PopulateEquipmentSelect(RadAutoCompleteBox equipmentAutoCompleteBox, bool preLoad = false) {
      equipmentAutoCompleteBox.TextSettings.SelectionMode = RadAutoCompleteSelectionMode.Single;
      EquipmentList equipmentList = EquipmentList.GetEquipmentList(_pageState.OrganizationUid, true, null);
      
      equipmentAutoCompleteBox.DataSource = equipmentList;
      equipmentAutoCompleteBox.DataBind();
}
Doncho
Telerik team
 answered on 05 May 2020
10 answers
380 views
I realise there are several threads on this subject and I have read every one I can find. I have tried all of the suggested solutions, but to no avail.
I've tried teh following solutions:

 Cannot get Upload/Delete to show
 Troubleshooting.

http://www.telerik.com/forums/radeditor-image-manager-upload-button-and-others-disabled---windows-authentication
http://stackoverflow.com/questions/12199021/rad-editor-telerik-control-image-manager-and-asp-net-button-issues-not-working
http://www.telerik.com/forums/radeditor-image-manager-buttons-disabled


My ImageManager WAS working until I updated to 2014 Q1. Since then, all of the tools in the ImageManager toolbar are disabled in all the environments I deploy to.
I get no permissions errors or any indication as to why the user can't upload.

I've checked and double checked the handlers in the web config.
I've tried removing and re-adding the Telerik references
I've tried removing and re-adding the RadEditor control with default settings.
I've tried checking the Smart Menu to make sure that the handler config is right.
I've set my Upload/Delete/View folder paths programmatically and declaratively.
I've tried setting the location in the webconfig

Here's my code

<system.webServer>
  <modules runAllManagedModulesForAllRequests="true">
     
     
    <remove name="RadUploadModule" />
    <remove name="RadCompression" /><add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter" />
    <add name="ExceptionlessModule" type="Exceptionless.Web.ExceptionlessModule, Exceptionless.Web" />
    <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode" />
    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode" />
  </modules>
  <validation validateIntegratedModeConfiguration="false" />
  <handlers>
     
    <remove name="ChartImage_axd" />
    <remove name="Telerik_Web_UI_SpellCheckHandler_axd" />
    <remove name="Telerik_Web_UI_DialogHandler_aspx" />
    <remove name="Telerik_RadUploadProgressHandler_ashx" />
    <remove name="Telerik_Web_UI_WebResource_axd" />
    <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode" />
    <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode" />
    <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode" />
    <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode" />
    <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode" />
  </handlers>
</system.webServer>


<telerik:RadEditor ID="BodyRadEditor" runat="server" Width="100%"  AllowScripts="True">
        <ContextMenus>
            <telerik:EditorContextMenu TagName="IMG">
                <telerik:EditorTool Name="SetImageProperties" />
            </telerik:EditorContextMenu>
            <telerik:EditorContextMenu TagName="TABLE">
                <telerik:EditorTool Name="ToggleTableBorder" />
                <telerik:EditorTool Name="SetTableProperties" />
                <telerik:EditorTool Name="DeleteTable" />
            </telerik:EditorContextMenu>
            <telerik:EditorContextMenu TagName="TD">
                <telerik:EditorTool Name="InsertRowAbove" />
                <telerik:EditorTool Name="InsertRowBelow" />
                <telerik:EditorTool Name="DeleteRow" />
                <telerik:EditorTool Name="InsertColumnLeft" />
                <telerik:EditorTool Name="InsertColumnRight" />
                <telerik:EditorTool Name="MergeColumns" />
                <telerik:EditorTool Name="MergeRows" />
                <telerik:EditorTool Name="SplitCell" />
                <telerik:EditorTool Name="DeleteCell" />
                <telerik:EditorTool Name="SetCellProperties" />
            </telerik:EditorContextMenu>
                    <telerik:EditorContextMenu TagName="BODY">
                    <telerik:EditorTool Name="PasteFromWord" />
                    <telerik:EditorTool Name="PastePlainText" />
                    <telerik:EditorTool Name="PasteAsHtml" />
                </telerik:EditorContextMenu>
        </ContextMenus>
 
    <Tools>
        <telerik:EditorToolGroup Tag="MainToolbar">
            <telerik:EditorSplitButton Name="Undo">
            </telerik:EditorSplitButton>
            <telerik:EditorSplitButton Name="Redo">
            </telerik:EditorSplitButton>
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="Print" ShortCut="CTRL+P / CMD+P" />
            <telerik:EditorTool Name="AjaxSpellCheck" />
            <telerik:EditorTool Name="FindAndReplace" ShortCut="CTRL+F / CMD+F" />
            <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A / CMD+A" />
            <telerik:EditorTool Name="Cut" ShortCut="CTRL+X / CMD+X" />
            <telerik:EditorTool Name="Copy" ShortCut="CTRL+C / CMD+C" />
            <telerik:EditorTool Name="Paste" ShortCut="CTRL+V / CMD+V" />
            <telerik:EditorToolStrip Name="PasteStrip">
            </telerik:EditorToolStrip>
        </telerik:EditorToolGroup>
        <telerik:EditorToolGroup Tag="InsertToolbar">
            <telerik:EditorTool Name="ImageManager" ShortCut="CTRL+G / CMD+G" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="LinkManager" />
            <telerik:EditorTool Name="InsertLink" />
        </telerik:EditorToolGroup>
        <telerik:EditorToolGroup Tag="DropdownToolbar">
            <telerik:EditorSplitButton Name="InsertSymbol">
            </telerik:EditorSplitButton>
            <telerik:EditorToolStrip Name="InsertTable">
            </telerik:EditorToolStrip>
                <telerik:EditorTool Name="ToggleTableBorder" />
        </telerik:EditorToolGroup>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="JustifyLeft" />
            <telerik:EditorTool Name="JustifyCenter" />
            <telerik:EditorTool Name="JustifyRight" />
            <telerik:EditorTool Name="JustifyFull" />
            <telerik:EditorTool Name="JustifyNone" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="Indent" />
            <telerik:EditorTool Name="Outdent" />
            <telerik:EditorSeparator />
            <telerik:EditorTool Name="InsertOrderedList" />
            <telerik:EditorTool Name="InsertUnorderedList" />
        </telerik:EditorToolGroup>
        <telerik:EditorToolGroup>
            <telerik:EditorTool Name="FormatSets" />
            <telerik:EditorTool Name="Bold" ShortCut="CTRL+B / CMD+B" />
            <telerik:EditorTool Name="Italic" ShortCut="CTRL+I / CMD+I" />
            <telerik:EditorTool Name="Underline" ShortCut="CTRL+U / CMD+U" />
            <telerik:EditorTool Name="StrikeThrough" />
        </telerik:EditorToolGroup>
    </Tools>
    <Content>
</Content>
 
    <ImageManager EnableAsyncUpload="true" AllowFileExtensionRename="False" AllowMultipleSelection="True" MaxUploadFileSize="2048000" DeletePaths="~/Uploads" UploadPaths="~/Uploads" ViewPaths="~/Uploads"></ImageManager>
    <TrackChangesSettings CanAcceptTrackChanges="False"></TrackChangesSettings>
</telerik:RadEditor>

        protected virtual void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ArticleMultiView.SetActiveView(ArticleFormView);
 
                if (!Directory.Exists(Server.MapPath(@"~/Uploads/" + user.Username)))
                    Directory.CreateDirectory(Server.MapPath(@"~/Uploads/" + user.Username));
 
                
                string[] path = new string[] { @"~/Uploads/" + user.Username + "/" };
 
                BodyRadEditor.ImageManager.UploadPaths = path;
                BodyRadEditor.ImageManager.ViewPaths = path;
                BodyRadEditor.ImageManager.DeletePaths = path;
...
...
...
               }
         }

Rumen
Telerik team
 answered on 05 May 2020
2 answers
115 views

I would like to change all the menu items that have a URL value to be LinkButtons instead of hyperlinks. That way, every time someone goes to another page, the master page form gets submitted. This will allow me to keep a hidden field persistent for all pages. Normally, I would use a session variable to accomplish this task, but we have a request to allow multiple tabs to be opened for the same site and allow the user to use the different tabs to work through different workflows without one tab affecting the other. I thought I could use the ItemTemplate section to change the links to linkbuttons, but I don't know how to structure it.

 

Thanks.

Peter Milchev
Telerik team
 answered on 05 May 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?