Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
165 views
Problem 1 : How to use validate custom JavaScript Function using RadInputManager
==========================================================
I have TextBox which accept Email Id as Input 
I want to validate following 


V1)Must be Required Field
V2)Must be valid Email Id
V3)Domain Part should not matched with gmail.com or yahoo.com etc
V4)I want to check that email id in DataBase(Already registerd id or not)


The above V1 and V2  i can achieve using 


Validation-IsRequired="true"  ValidationExpression="^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$" ErrorMessage="Invalid Email"


But instead of your code i want to validate using My JavaScript Code


Current Now i'm displaying Error Message in Label


But I want to show my Error Message inside TextBox


I don't know how to get BehaviorID of txtemailid(textbox) and How i set My Custom Error Message inside TextBox


I.e How can i access Validation-IsRequired and ErrorMessage Properties using script?


Also As I mentioned Earlier I want to check that email id in DataBase(Already registerd id or not)..How can i achieve this using RadInputManager


Please solve my problem..Thank You


My ASPX
========
<form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server" />


    <div>
      <div id="divemail">
            <div style="width:150px; float:left; font-weight:bold;"><span style="color:Red;">*</span>&nbsp;Email Id</div>
            <div>
            <div style=" width:235px; float:left;">
          <asp:TextBox ID="txtemailid" Width="150px" runat="server"></asp:TextBox>
              
              </div></div>
            <div style=" float:left; height:10px; padding-left:10px;"> 
                <asp:Label ID="lblemail" runat="server" ForeColor="#CC0000"></asp:Label> 
            
            </div>
        </div>
    </div>
    
    
    
    <telerik:RadInputManager ID="RadInputManager1" runat="server">
    
    
   <telerik:RegExpTextBoxSetting ClientEvents-OnBlur="EmailValidate" BehaviorID="Regexemailid" runat="server" EmptyMessage="Email Id">
   <TargetControls><telerik:TargetInput  ControlID="txtemailid"/></TargetControls>
   




   
    </telerik:RegExpTextBoxSetting>
   </telerik:RadInputManager>
   
   </form>
    <script type="text/javascript" language="javascript">


        function EmailValidate(sender, eventArgs) {
           
            document.getElementById('lblemail').innerHTML = "";
            var emailid = eventArgs.get_targetInput().get_value();
          
            if (emailid.length == 0)
            {
                document.getElementById('lblemail').innerHTML = "Required";


                args.IsValid = false;
            }
            //Invalid Email id
            else if (emailid.length > 0 && emailid.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
            {
                document.getElementById('lblemail').innerHTML = "Invalid Email ID";
                args.IsValid = false;
            }
            //This block has only Valid Email Ids--We have to check that domain
            else if (emailid.length > 0 && emailid.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
            {  
               var domain = emailid.toLowerCase();
                   domain = domain.substring(emailid.indexOf("@") + 1, emailid.length);
               if (domain == "yahoo.co.in" || domain == "gmail.com") {
                        document.getElementById('lblemail').innerHTML = "This Domain (" + domain + ") has been Blocked.Please choose different Email Id";                      
                 }
                args.IsValid = false;
            }
      


        }
        
    
    </script>




==========================================


With Regards,
Maha
Tsvetina
Telerik team
 answered on 30 Aug 2012
3 answers
196 views
Hi All,

I am using a RadComboBox with checkboxes and I want to get its checked item on button click. For this I am using CheckedItems property of combo box.

I am correctly getting the checked items if I use the combo box outside a RadGrid, but when I use the same combo box inside a RadGrid, I am not getting any checked items (count=0). I can correctly get the text of combo box, but cannot understand what is problem with getting the checked items.

Please help!!! Thanks in advance...

Dhaval
Ivana
Telerik team
 answered on 30 Aug 2012
1 answer
163 views
hi this is the structure of my page..
loading panel is working fine in Chrome and IE8.
but in FireFox page is not completely loaded but the loading image vanished.

<asp:Content ID="Content4" ContentPlaceHolderID="PageCenterContent" runat="server">
  
   <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
        function pageLoad(sender, eventArgs) {
        
              if (!eventArgs.get_isPartialLoad()) {
                var myAjaxControl = <%= RadAjaxManager1.ClientID %>;
                    myAjaxControl.ajaxRequest();
               }
          
        }
        
     

     function OnResponseEnd(sender, eventArgs)
        {      
           var currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
            var currentUpdatedControl = "ctl00_PageCenterContent_Radpanebottom";
            currentLoadingPanel.hide(currentUpdatedControl);
              
        }

        function OnRequestStart(sender, eventArgs)
        {
            var currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
            var currentUpdatedControl = "ctl00_PageCenterContent_Radpanebottom";
            currentLoadingPanel.show(currentUpdatedControl);
        
        }
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
         ClientEvents-OnRequestStart="OnRequestStart"
        ClientEvents-OnResponseEnd="OnResponseEnd" onajaxrequest="RadAjaxManager1_AjaxRequest1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Web20" IsSticky="false"
        Height="220px">
    </telerik:RadAjaxLoadingPanel>
    <%-- start RadSplitterContent--%>
    <telerik:RadSplitter ID="radSplitterContent" runat="server" Skin="WebBlue" LiveResize="True"
        Width="95%" CssClass="marginAuto" Height="720">
        <%-- start RadPaneSensorBar--%>
      
        <telerik:RadPane ID="RadPaneSensorBar" runat="server" Height="100%" Width="272" MaxWidth="265">
          <fieldset class="Sensorgrp">
           <legend style="text-align:left;">Sensor Group</legend>
            <telerik:RadPanelBar ID="sensorPanelBar" runat="server" ExpandMode="SingleExpandedItem"
                Skin="WebBlue" OnItemClick="sensorPanelBar_ItemClick" OnItemDataBound="sensorPanelBar_ItemDataBound">
            </telerik:RadPanelBar>
            </fieldset>
        </telerik:RadPane>
        <%-- End RadPaneSensorBar--%>
      
        <%-- start RadpaneMid--%>

        <telerik:RadPane ID="RadpaneMid" runat="server" Scrolling="None" Height="700" Width="720">
            <%-- start RadsplitterMid--%>
           

            <telerik:RadSplitter ID="RadsplitterMid" runat="server" Orientation="Horizontal" Width="680" >
                <%-- start RadPaneRotator--%>
                
                <telerik:RadPane ID="RadPaneRotator" runat="server" Scrolling="None" Height="75" Width="680">
                 <fieldset style=" height:59px; width: 697px;">
              <legend style="text-align:left;">Sensors</legend>
            
                    <telerik:RadRotator ID="SensorRadRotator" runat="server" ScrollDuration="2000" RotatorType="Buttons"
                        Height="50px" ItemHeight="20px" Width="590px" ItemWidth="200px" CssClass="marginAuto boarderNone"
                        Skin="MetroTouch" OnItemDataBound="SensorRadRotator_ItemDataBound"
                         OnItemClick="SensorRadRotator_ItemClick1">
                        <ItemTemplate>
                            <div class="product bgpurple" runat="server" id="Product">
                                <div class="productleft" runat="server" id="productleft">
                                <asp:Image ID="StatusImg" runat="server" ImageUrl="~/Images/play-icone-6427-16.png" />
                                 
                                </div>
                                <div class="productright">
                                    <asp:Label ID="lblName" runat="server" Style="color: white; float: left; font-weight: bold;"></asp:Label>
                                    <asp:HiddenField ID="hdnSensorId" runat="server" />
                                    <br />
                                    <asp:Label ID="lblStatus" runat="server" Style="color: white; float: left;"></asp:Label>
                                </div>
                            </div>
                        </ItemTemplate>
                    </telerik:RadRotator>
                       </fieldset>         
                </telerik:RadPane>
               
 
                <%-- end RadPaneRotator--%>
                <%-- start Radpanebottom--%>
                <telerik:RadPane ID="Radpanebottom" runat="server" Scrolling="none" Height="650">
                </telerik:RadPane>
                <%-- end Radpanebottom--%>
            </telerik:RadSplitter>                          
               
            <%-- End RadsplitterMid--%>
        </telerik:RadPane>
        <%-- End RadpaneMid--%>
    </telerik:RadSplitter>
    <%-- End  RadSplitterContent--%>

   
                    
</asp:Content>



Eyup
Telerik team
 answered on 30 Aug 2012
3 answers
134 views
Hi all,
How to persistence the selected row of file explorer during the sorting and paging of telelrik file explorer grid.
I detected  TELERIKs new version have  already build in functionality of persistence the selected row during the sorting and paging. i am using DOTNETNUKE 6.1.5 and telelrik version is -2012.1.411.35,
is there any version problem ? or how can i do this ...
Dobromir
Telerik team
 answered on 30 Aug 2012
1 answer
133 views
Hello,

How to get client id of all date picker control on a page using javascript like the way we can get array of rad comboboxes


teleric.web.ui.Radcombobox.comboboxes[i]...

so is there any way to get clientid/array of date picker control


thanks,
Nilesh 
Eyup
Telerik team
 answered on 30 Aug 2012
21 answers
619 views
I've set the style of the empty message to:
<EmptyMessageStyle Font-Italic="True" ForeColor="#999999" /> 
when hovering over the textbox, however, this style is lost and it reverts to it's default font.  Is there something else I need to set or is this a defect?

Respectfully,

Jeff Beem
Vasil
Telerik team
 answered on 30 Aug 2012
5 answers
125 views
After upgrading to Q2 2012 I quickly noticed 2 issues:

1.
myradinput.Focus();
No longer focuses the control.

2.
function(sender, args) { $get('" + BadgeNo.ClientID + "' + '_text').focus(); }
Throws a JS error saying something like object not found.

The 2nd Issue I fixed by removing the _text suffix however this is of course not something acceptable.

For the 1st issue I found no fix so I was forced to revert back to Q1.
Vasil
Telerik team
 answered on 30 Aug 2012
3 answers
100 views
Hi,

As we have related combobox functionality with RadCombobox. I want to use such functionality with RadGridDropDownColumn in RadGrid.

Is it possible to do?if you can provide any sample code for that.it will be very helpfull.

Thanks.
Rootvik Pancholi.
Tsvetina
Telerik team
 answered on 30 Aug 2012
1 answer
96 views
Hi,

I have a function that iterates through all the nodes and places the checked nodes into a list. The problem is that it will miss any child nodes of collapsed parents because the parents are created on the server side with Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack.

I believe what is happening is that because these nodes are defined requiring a callback, that their children are not written out to the browser until that AJAX callback is fired. Because of this, they do not come up in the tree.get_allNodes call I use to iterate through all the nodes at the time I use it because the parent nodes in question have not been expanded (i.e., the child nodes in question have not been added to the document).

Forcing all the nodes to expand prior to checking for checked nodes works, but is unwieldy.

Does anyone have any suggestions or ideas about how I might work around this? I'm not that familiar with using this control, so I thought maybe a more experienced user might be able to guide me in the right direction.

Any help appreciated.

Thanks,
Ted





Bozhidar
Telerik team
 answered on 30 Aug 2012
1 answer
112 views
One can set it to be expanded on load as well as to not collapse on blur, but is there a way to force it to always be expanded? Various events will still collapse it and make the app look clunky. :< 

i would like to use it like a listbox but with the filtering of a combobox (letter decoration of matched strings, etc ). I currently do it with standard asp.net listbox control and textbox control but want the rich text, etc. :>

 Thanks.
Nencho
Telerik team
 answered on 30 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?