Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
213 views

Hi,
   I have used TextBox in my project.
This is my coding
 <asp:TextBox Width="95%" ID="Email" AutoCompleteType="Disabled" runat="server" CssClass="Lowercase1" Text='<%# Bind("emailid") %>'  MaxLength="50" onkeydown = "return (event.keyCode!=13);"></asp:TextBox>

Text box validate in Email

<telerik:RadInputManager ID="RadInputManager1" runat="server" EnableEmbeddedSkins="false">
 <telerik:RegExpTextBoxSetting ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
   ErrorMessage="Invalid Email" EnabledCssClass="Lowercase1" DisabledCssClass="Lowercase1">
    <TargetControls>
      <telerik:TargetInput ControlID="Email" />
    </TargetControls>
  </telerik:RegExpTextBoxSetting>
</telerik:RadInputManager>

this coding is working perfectly but AutoCompleteType="Disabled" is not working

same as Web address validation

<telerik:RegExpTextBoxSetting ValidationExpression="www.([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?"
  ErrorMessage="Invalid Web Address" EnabledCssClass="Lowercase1" DisabledCssClass="Lowercase1">
   <TargetControls>
      <telerik:TargetInput ControlID="WebAddress" />
    </TargetControls>
 </telerik:RegExpTextBoxSetting>

Plz reply soon

Thanks,
Ansari


Tamim
Top achievements
Rank 1
 answered on 24 Nov 2012
1 answer
158 views
I have a formview inside my radwindow.  If close button is clicked inside a formview I want the window to close.
I tried to call javascript to close window, event is fired, but it does not close the window.
**********  Javascript ************

 function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow)
                    oWindow = window.radWindow;
                else if (window.frameElement.radWindow)
                    oWindow = window.frameElement.radWindow;
                return oWindow;
            }

            function Close() {
                var arg = new Object();
                var oWnd = GetRadWindow();
                oWnd.close(arg);  
            }

********** Button to close the radwindow inside formview **************
      <asp:LinkButton ID="lnkBtnClose" runat="server" CausesValidation="False" CommandName="Close"                                    Text="Close" ToolTip="Close"  OnClientClick="Close(); return false;" />
Kevin
Top achievements
Rank 2
 answered on 23 Nov 2012
2 answers
259 views
Hello,

When I try to use raddatepicker.selecteddate  for a datetime var I get this error:

Cannot implicitly convert type 'object' to 'System.DateTime'. An explicit conversion exists (are you missing a cast?)
 
Here is my code:

    public partial class RegistroFalla
    {
        public int ID_Falla { get; set; }
        public Nullable<int> Duracion_Falla { get; set; }
        public System.DateTime Fecha { get; set; }
        public System.DateTime Hora_Deteccion { get; set; }
        public System.DateTime Hora_Diagnostico { get; set; }
        public System.DateTime Hora_Ocurrencia { get; set; }
        public System.DateTime Hora_Recuperacion { get; set; }
        public System.DateTime Hora_Solucion { get; set; }
        public string Descripcion { get; set; }
        public System.DateTime Tiempo_Deteccion { get; set; }
        public System.DateTime Tiempo_Recuperacion { get; set; }
        public System.DateTime Tiempo_Reparacion { get; set; }
        public System.DateTime Tiempo_Respuesta { get; set; }
        public string Division { get; set; }
    }

   var Fallo = new RegistroFallas.Model.RegistroFalla
                {
                    Hora_Ocurrencia = dpOcurrencia.SelectedDate,
                    Fecha = rdpFecha.SelectedDate,
                    Descripcion = txtDescripcion.Text,
                    Hora_Deteccion = rdpDeteccion.SelectedDate,
                    Hora_Diagnostico = rdpDiagnostico.SelectedDate,
                    Hora_Solucion = rdpSolucion.SelectedDate,
                    Hora_Recuperacion = rdpRecuperacion.SelectedDate
                };


Thanks,

Jorge
Jorge
Top achievements
Rank 1
 answered on 23 Nov 2012
2 answers
107 views
The code that I'm managing used an older version of the Telerik assemblies. We recently upgraded the assemblies to the most recent version. Upon upgrading said files, I received complaints that the paging was no longer showing on a grid. This is weird, since "Allow Paging" is set to True in the markup. I did some playing around and noticed if I removed the GroupByExpressions from the grid, the paging works fine. The GroupByExpressions seems to work fine either way, but is preventing the paging from working. Could someone possibly shine some light on the situation? I've included the grid's code below. Note: Ignore the empty strings; I removed some of the values for security reasons.

<telerik:RadGrid ID="RgStatusGrid" runat="server" AllowPaging="True" GridLines="None"
    AllowSorting="true" PageSize="50" OnNeedDataSource="RgStatusGrid_NeedDataSource"
    OnItemDataBound="OnItemDataBound" OnSortCommand="RgStatusGrid_SortCommand">
    <MasterTableView AutoGenerateColumns="false">
        <GroupByExpressions>
            <telerik:GridGroupByExpression>
                <SelectRegions>
                    <telerik:GridGroupByRegion RegionName="StateName" HeaderText="State" SortOrder="Ascending" />
                    <telerik:GridGroupByRegion RegionName="CityName" HeaderText="City" SortOrder="Ascending" />
                </SelectRegions>
                <GroupByRegions>
                    <telerik:GridGroupByRegion RegionName="StateName" HeaderText="State" SortOrder="Ascending" />
                    <telerik:GridGroupByRegion RegionName="CityName" HeaderText="City" SortOrder="Ascending" />
                </GroupByRegions>
            </telerik:GridGroupByExpression>
        </GroupByExpressions>
        <RowIndicatorColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn>
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <telerik:GridBoundColumn UniqueName="StateName" DataRegion="StateName" HeaderText="State" Visible="false" />
            <telerik:GridBoundColumn UniqueName="CityName" DataRegion="CityName" HeaderText="City" Visible="false" />
            <telerik:GridBoundColumn DataRegion="RegionName" HeaderText="Region" />
            <telerik:GridBoundColumn DataRegion="Area" HeaderText="Area (acres)" DataFormatString="{0:F2}" />
            <telerik:GridBoundColumn DataRegion="" HeaderText=""
                DataFormatString="{0:MM/dd/yyyy}" />
            <telerik:GridBoundColumn DataRegion="" HeaderText=""
                DataFormatString="{0:MM/dd/yyyy}" />
            <telerik:GridBoundColumn DataRegion="" HeaderText=""
                DataFormatString="{0:MM/dd/yyyy}" />
            <telerik:GridBoundColumn DataRegion="" HeaderText=""
                DataFormatString="{0:MM/dd/yyyy}" />
            <telerik:GridBoundColumn DataRegion="" HeaderText="" DataFormatString="{0:MM/dd/yyyy}" />
            <telerik:GridBoundColumn DataRegion="" HeaderText="" />
            <telerik:GridBoundColumn DataRegion="" HeaderText="" DataFormatString="{0:MM/dd/yyyy}" />
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
Brandon
Top achievements
Rank 1
 answered on 23 Nov 2012
3 answers
349 views
I was able to accomplish session expiration using the notification control set up for my web application thanks to this demo:

http://demos.telerik.com/aspnet-ajax/notification/examples/sessiontimeout/sessionexpired.aspx

However, this approach is based on a set timeout value and the notification just pops up every timed interval, regardless if the user is active or not. Can the session timeout be set/reset dynamically based on user inactivity? Possibly every time there is an Ajax request call? Some sample codes would be much appreciated. Thanks.
SDI
Top achievements
Rank 1
 answered on 23 Nov 2012
6 answers
105 views

Greetings,

I am new to Telerik (pretty new to asp.net) and cannot figure out why my AXAX CascadingDropDown events do not fire when I wire them up to control my RadAjaxLoadingPanel. The LoadingPanel updates but no SelectedIndexChanged event is call.

My code works when I disable/remove theRadAjaxLoadingPanel
 
I looked all over for the CascadingDropDown example but no success. I saw that I might need to rebind, but I'm not sure what I'm looking for to do this? Thanks

ASPX Page

<form id="frm1" runat="server" class="" enableviewstate="true">
 
<telerik:RadScriptManager runat="server" ID="RadScriptManager1">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        EnablePageHeadUpdate="False" ViewStateMode="Enabled">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="auto_ddlMake">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="auto_ddlModel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="lnkReset" EventName="Click">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
 
<asp:DropDownList ID="auto_ddlMake" runat="server" AutoPostBack="True" class="itext"
                        OnSelectedIndexChanged="auto_ddlMake_SelectedIndexChanged" Width="125px" />
                    <ajaxToolkit:CascadingDropDown ID="CascadingDropDown1" runat="server" Category="Make"
                        ParentControlID="auto_ddlYear" PromptText="-- Pick --" ServiceMethod="GetMakes"
                        ServicePath="CascadingDropDown.asmx" TargetControlID="auto_ddlMake" />
 
<asp:DropDownList ID="auto_ddlModel" runat="server" AutoPostBack="True" class="itext"
                        OnSelectedIndexChanged="auto_ddlModel_SelectedIndexChanged" Width="125px" />
                    <ajaxToolkit:CascadingDropDown ID="CascadingDropDown2" runat="server" Category="Model"
                        ParentControlID="auto_ddlMake" PromptText="-- Pick --" ServiceMethod="GetModels"
                        ServicePath="CascadingDropDown.asmx" TargetControlID="auto_ddlModel" />
<asp:LinkButton ID="lnkReset" runat="server" CausesValidation="False" OnClick="btnReset_Click"
                        Text="Reset" ToolTip="Clear all fields"></asp:LinkButton>
 
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" ViewStateMode="Enabled">
        <div class="loading">
            Loading<br />
            <asp:Image ID="Image1" runat="server" ImageUrl="~/images/loading1.gif" AlternateText="loading">
            </asp:Image>
        </div>
    </telerik:RadAjaxLoadingPanel>
</form>

Codebehind

protected void auto_ddlModel_SelectedIndexChanged(object sender, System.EventArgs e)
    {
        Response.Write("ddlmodel Called!");
        Response.End();
    }

 

Pavlina
Telerik team
 answered on 23 Nov 2012
3 answers
77 views
We've encountered an unusual problem where sometimes if multiple tabs have been opened and closed (with pageviews being destroyed etc) that some tabs seem to "swap" their text.

All tabs definitely have a unique ID (based on record type, record id etc).

Also, possibly related, sometimes a tab will display the pageview from another tab at the bottom.
This is not a problem we can reproduce via set steps, it just seems to randomly happen.

Has anyone else encountered this? Any ideas on a possible solution?

Cheers
Rich
Nencho
Telerik team
 answered on 23 Nov 2012
9 answers
143 views
I try to combine the example "TreeView in ComboBox" and "TreeView / Programmatic Data Binding"
I use "BindToDataSet(ByVal treeView As RadTreeView)", but i only get  System.NullReferenceException.
Tips on what the problem might be, or is there any example (vb) available?
Boyan Dimitrov
Telerik team
 answered on 23 Nov 2012
0 answers
79 views
I think I know the answer already but I have a TreeView with a Node Template in it, can I save it somehow with GetXML? Failing that can anyone suggest a workaround.

Definition of RadTreeView
<telerik:RadTreeView ID="RadTreeView1" runat="server" CheckBoxes="True" MultipleSelect="True"
     EnableViewState="true" ShowLineImages="False" EnableEmbeddedSkins="False" Skin="tree_2"
     OnNodeClick="RadTreeView1_NodeClick" OnNodeDataBound="RadTreeView1_NodeDataBound"
     OnClientNodeCollapsed="OnClientNodeCollapsed" OnClientNodeExpanded="OnClientNodeExpanded">
     <NodeTemplate>
         <small>
             <asp:Label ID="lblnodeText" Text='<%#Eval("Title") %>' runat="server" /><asp:Label
                 ID="lblCatId" Text='<%#Eval("Id") %>' runat="server" Visible="false"></asp:Label><asp:Label
                     ID="lblisCustomer" Text='<%#Eval("isCustomer") %>' runat="server" Visible="false"></asp:Label><asp:Label
                         ID="Description" runat="server" Text='<%#Eval("description") %>' Visible="false" /><asp:HiddenField
                             ID="DescriptionVisible" runat="server" Value='<%#Eval("descriptionVisible") %>' />
         </small><small><a href="javascript:Popup_Window('category_detail','<%# Eval("id") %>')"
             style="text-decoration: none;"><span style="color: #BBBBBB">e</span></a></small></NodeTemplate>
 </telerik:RadTreeView>

XML File
<?xml version="1.0" encoding="utf-16"?>
<Tree ShowLineImages="False" CheckBoxes="True" MultipleSelect="True" OnClientNodeExpanded="OnClientNodeExpanded" OnClientNodeCollapsed="OnClientNodeCollapsed" DataFieldID="Id" DataFieldParentID="IdParent" DataTextField="Title" DataValueField="Id" Skin="tree_2" EnableEmbeddedSkins="False">
  <Node Text="Product Library" Value="1095" Expanded="True" Checkable="False" ExpandMode="ServerSide">
    <Node Text="Spirits" Value="2270" Expanded="True" ExpandMode="ServerSide">
      <Node Text="Boubon Wiskey" Value="2357" ExpandMode="ServerSide" />
      <Node Text="Tequila" Value="2368" Expanded="True" ExpandMode="ServerSide">
        <Node Text="Unknown Tequila" Value="2371" ExpandMode="ServerSide" />
        <Node Text="Anejo" Value="2372" ExpandMode="ServerSide" />
        <Node Text="Blanco" Value="2373" ExpandMode="ServerSide" />
        <Node Text="Reposado" Value="2374" ExpandMode="ServerSide" />
      </Node>
      <Node Text="Scotch" Value="2369" ExpandMode="ServerSide" />
      <Node Text="Vodka" Value="2370" ExpandMode="ServerSide" />
    </Node>
    <Node Text="Wines" Value="1564" Expanded="True" ExpandMode="ServerSide" />
    <Node Text="Beer" Value="2251" ExpandMode="ServerSide" />
    <Node Text="Miscellaneous" Value="2252" ExpandMode="ServerSide" />
    <Node Text="By Country" Value="2287" ExpandMode="ServerSide" />
    <Node Text="By Spirit Type" Value="2288" ExpandMode="ServerSide" />
    <Node Text="By Grape Type" Value="2289" ExpandMode="ServerSide" />
    <Node Text="By Region" Value="2295" ExpandMode="ServerSide" />
  </Node>
  <Node Text="Retailers" Value="2356" Expanded="True" Checkable="False" ExpandMode="ServerSide">
    <Node Text="Gates Circle" Value="2375" Expanded="True" ExpandMode="ServerSide">
      <Node Text="Spirits" Value="2376" ExpandMode="ServerSide">
        <Node Text="Vodka" Value="2382" ExpandMode="ServerSide" />
        <Node Text="Tequila" Value="2383" ExpandMode="ServerSide">
          <Node Text="Blanco" Value="2384" ExpandMode="ServerSide" />
        </Node>
        <Node Text="Scotch" Value="2385" ExpandMode="ServerSide" />
      </Node>
      <Node Text="Wine" Value="2377" ExpandMode="ServerSide" />
      <Node Text="Beer" Value="2378" ExpandMode="ServerSide" />
      <Node Text="Miscellaneous" Value="2379" ExpandMode="ServerSide" />
    </Node>
    <Node Text="Emilio's Beverage Warehouse" Value="2386" ExpandMode="ServerSide">
      <Node Text="Spirits" Value="2387" ExpandMode="ServerSide" />
      <Node Text="Wine" Value="2388" ExpandMode="ServerSide" />
      <Node Text="Beer" Value="2389" ExpandMode="ServerSide" />
      <Node Text="Miscellaneous" Value="2390" ExpandMode="ServerSide" />
    </Node>
    <Node Text="Pickard Liquor" Value="2396" ExpandMode="ServerSide">
      <Node Text="Spirits" Value="2397" ExpandMode="ServerSide" />
      <Node Text="Wine" Value="2398" ExpandMode="ServerSide" />
      <Node Text="Beer" Value="2399" ExpandMode="ServerSide" />
      <Node Text="Miscellaneous" Value="2400" ExpandMode="ServerSide" />
    </Node>
  </Node>
</Tree>
Tonyz289
Top achievements
Rank 1
 asked on 23 Nov 2012
1 answer
74 views
After a lot of fumbling around to figure out why the popup text on image maps in SharePoint 2010 weren't working, I figured out that IE8 and Chrome don't use the ALT tag any longer in image maps. . .they now use the TITLE tag to show tooltips or popups on image mapped items.  However, the version 6.3 of RadEditor for SharePoint 2010 that I'm using doesn't support the TITLE tag - only ALT.  Is there a plan to change this in a future version, or is there another workaround other than going into the HTML source and changing it? 
Rumen
Telerik team
 answered on 23 Nov 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?