Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
503 views
Hello,

I would like to handle the OnKeyPress event to put focus on the next input control on the form when the enter key is pressed.  I have this working for textboxes and comboboxes, and can focus the dateinput in the datepicker, but the enter key is not firing the OnKeyPress client event for the datepicker's dateinput control.  The first debugger statement is hit when I enter a normal text key (e.g. '1', 'a'), but when hitting the enter key, nothing happens (the keyPressed_textbox function is never executed).  Any ideas why the enter key is not firing the event?


 
                                <telerik:RadDatePicker   
                                    DateInput-ClientEvents-OnKeyPress="keyPressed_textbox"   
                                    TabIndex="5"   
                                    runat="server"   
                                    ID="datepickerDob"   
                                    Width="180px"   
                                    MinDate="1/1/1900"   
                                    CssClass="body_copy" /> 

 
 
            function keyPressed_textbox(sender, args) {  
                debugger;  
                if ( 13 == args.get_keyCode() ) {  
 
                    /* never gets here for RadDatePicker's DateInput OnKeyPress event */ 
                }  
            } 

edit: I have a similar problem with RadComboBoxes that have MarkFirstMatch set to true - the enter key does not fire the OnClientKeyPressing event, but the event is fired when MarkFirstMatch is set to false.  Is there anything I can do about this?
Daniel
Telerik team
 answered on 29 Jan 2010
5 answers
330 views
Hi:
I have a RadPanelBar with a several RadPanelItem inside of it.

To disable or enable a panelItem on the server side I use the following code

 (this.RadPanelBar1.Items[i] as RadPanelItem).Enabled= enable
where "i" is the panel that I want to disable. With this the panel and all its controls are disabled.

But I haven't found a javascript that make the same. I've tried with this code:
 var panel=$find('RadPanelBar1');

panel.get_items().getItem(i).set_enabled(false); where "i" is the panel that I want to disable, but this time only the header is disabled. its controls are enabled.

I would like to make this:  (this.RadPanelBar1.Items[i] as RadPanelItem).Enabled= false in the client-side. Is it possible?

Thanks.






Rob
Top achievements
Rank 1
 answered on 29 Jan 2010
9 answers
142 views
Hello Team

Our web application is using Wizard skin for tabstrip from Q3 2008. But it seems not exist in newer version of Telerik (Q3 2009). I tried to customize for this wizard  but new css define may not easy with me. Can you help me to upload Wizard skin for tabstrip? I love this tabstrip style.

Thank for your help
Hung
Top achievements
Rank 1
 answered on 29 Jan 2010
2 answers
447 views
I have a simple login page that uses the RadAjaxManager and a ASP login control.  The login control uses a template with two text boxes and a RadAjaxLoadingPanel and a ASP button.  When I set the RadAjaxManager  "EnableAJAX" property to true, the enter key does not work when the user tries to login.  They have to manually click the login button.  But when I set that property to false, everything works as it should.  The user can hit the enter key after inputting the password.  They don't have to manually hit click on the button.  Here is my login.aspx.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="login" %> 
 
<%@ 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"> 
 
<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title>Login</title> 
    <script type="text/javascript" src="scripts/jquery-1.3.2.min.js"></script> 
</head> 
<body> 
    <form id="form1" runat="server"> 
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
        </telerik:RadScriptManager> 
        <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" ControlsToSkip="Fieldset" /> 
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" EnableAJAX="true"> 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="Login1"> 
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="Login1" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
        </telerik:RadAjaxManager>     
        <fieldset id="fieldsetlogin"> 
            <legend></legend> 
 
            <asp:Login ID="Login1" runat="server" DestinationPageUrl="~/test.aspx" FailureText="<div class='error'>Invalid Login!</div>" OnAuthenticate="Login1_Authenticate"> 
                <LayoutTemplate> 
                    <br />                                 
                    <table border="0" cellpadding="1" cellspacing="0" style="border-collapse: collapse"> 
                        <tr> 
                            <td> 
                                <table border="0" cellpadding="3"> 
                                    <tr> 
                                        <td align="center" colspan="3"> 
                                            <span class="bold gray">Please enter your login information.</span> 
                                        </td> 
                                    </tr>                                                 
                                    <tr> 
                                        <td align="center" colspan="3"> 
                                            <asp:Literal ID="FailureText" runat="server" EnableViewState="False" Text="&nbsp;"></asp:Literal> 
                                        </td> 
                                    </tr>                                             
                                    <tr> 
                                        <td> 
                                            <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" CssClass="loginLabel" Width="100px">User Name:</asp:Label></td> 
                                        <td> 
                                            <asp:TextBox ID="UserName" runat="server" Width="225px"></asp:TextBox></td> 
                                        <td> 
                                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator></td> 
                                    </tr> 
                                    <tr> 
                                        <td> 
                                            <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="loginLabel" Width="100px">Password:</asp:Label></td> 
                                        <td> 
                                            <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="225px"></asp:TextBox></td> 
                                        <td> 
                                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="Login1">*</asp:RequiredFieldValidator></td> 
                                    </tr> 
                                    <tr> 
                                        <td align="right" colspan="2"> 
                                            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" IsSticky="true" runat="server" Skin="WebBlue" Visible="true" Transparency="30" Height="35px" BackgroundPosition="Center" EnableAjaxSkinRendering="true"> 
                                            </telerik:RadAjaxLoadingPanel> 
                                            <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text="Sign In" ValidationGroup="Login1" /> 
                                        </td> 
                                        <td>&nbsp;</td> 
                                    </tr> 
                                </table> 
                            </td> 
                        </tr> 
                    </table>                                 
                </LayoutTemplate> 
            </asp:Login> 
        </fieldset> 
    </form> 
</body> 
</html> 
 

Chon
Top achievements
Rank 1
 answered on 29 Jan 2010
1 answer
191 views
Hello,

I have been attempting to implement a tooltip modal dialog that will display when an event happens, such as when a user clicks a link.  All is fine in my testing environment both with IE6 and IE7, but the problem occurs when I place my user control into SharePoint.  The tooltip when displayed within SharePoint shows up after all of the HTML that is already rendered on the page.  Additionally, it shows behind the grey wall that would normally appear behind the control.  I am attaching a couple of screenshots as well as the code for my user control.  If anyone can help me in getting this to render correctly in SharePoint with IE7, I would be most appreciative.  Thank you for your time and have a great night.

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ToolTipTest.ascx.cs" Inherits="ToolTipTest" %> 
<%@ Register Assembly="Telerik.Web.UI, Version=2009.2.826.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<script type="text/javascript">  
 
    function closeToolTip(strToolTipID)  
    {  
        var ToolTip = $find(strToolTipID);  
        if (ToolTip.isVisible())  
        {  
            ToolTip.hide();  
        }  
    }  
      
    function showToolTip(strToolTipID)  
    {  
        var ToolTip = $find(strToolTipID);  
        if (!ToolTip.isVisible())  
        {  
           ToolTip.show();  
        }   
    }  
      
    var tipToolTip = '<%= tipToolTip.ClientID %>';  
      
</script> 
    <div style="height: 200px; width: 400px; text-align: center; border: solid 1px #000;">  
        This is body text. <a href="#" onclick="showToolTip(tipToolTip); return false;">Click here</a> to display the tooltip.  
    </div> 
 
    <telerik:RadToolTip id="tipToolTip" runat="server" Modal="True" 
        Position="Center" RelativeTo="BrowserWindow" AutoCloseDelay="0" HideDelay="0"   
        RenderInPageRoot="True" ShowDelay="0" ShowEvent="FromCode" 
    > 
        This is my tooltip. <a href="#" onclick="closeToolTip(tipToolTip); return false;">Click here</a> to close the tooltip.  
    </telerik:RadToolTip> 
Nameless
Top achievements
Rank 1
 answered on 29 Jan 2010
2 answers
147 views
Hi,
In radupload and radeditor i change language with resource file, but in radgrid i can't, how i can change the language the seem way.

thx
Jhonattan
Top achievements
Rank 2
 answered on 29 Jan 2010
2 answers
242 views
Hi all
I want users to be able to use hot keys to add/update/delete rows to the radgrid. If they are adding a new row as soon as they enter the data and they press ctrl+shift+I they should be able to save the current row and a new row should be inserted where they can continue entering data for the new row. I use fireCommand to perform the insert which works fine but then if i use another firecommand statement to insert an empty row the update fails. What is interesting is that if i place an alert() statement between the 2 fireCommand calls it works in that case. See the javascript function below that i'm using

<

script type="text/javascript">

 


function

KeyPress(sender, eventArgs)

 

{

 

var grid;

 

 

var table;

 

 

grid = sender;

table = grid.get_masterTableView();


 

//CTRL+Shift+I

 

 

if (eventArgs._keyCode == 73 && eventArgs._isCtrlPressed && eventArgs._isShiftPressed)

 

{

 

 

 

eventArgs.set_cancel(

true);

 

 

 

if (table.get_isItemInserted())

 

{

    table.fireCommand(

"PerformInsert", "");
    //alert("now insert another empty row");  

    table.fireCommand("PerformInsert", "");

 

 

 

}

 

}

</

script>

 


Also after any insert/upadate/delete the focus is lost from the grid. How can i set focus back to the radgrid so that the user can continue using arrow keys in the grid. Any assistance will be greatly appreciated!

thanks
mtoori
muhammad toori
Top achievements
Rank 1
 answered on 29 Jan 2010
4 answers
160 views
I write so fast at editor and sometimes i click on backspace on editor area or focused on other areas of page. So how can i prevent accidental clicks that causing a lose of entry? :)
Ismet
Top achievements
Rank 1
 answered on 29 Jan 2010
1 answer
170 views
Dear Telerik-Team.

It is possible to modifed the header element of any panelbar.

1.)
I want to show 2 Icons on each panelbar (extanded to the arrow) header an then I want to react on the events each icon can be bubble. Is this possible?

2.)
I only found one imageurl on each panelbar, but there is no event i can handle to react on it if the user click on the image. I only can  react on the "OnItemClick" of the panelbar header but there are no command or event arg to check if the header, the expand arror or my image is clicked and rise the event.

Thanks for help.

Regards
Christian

Peter
Telerik team
 answered on 29 Jan 2010
1 answer
119 views
Hi all:

I have an ASP.NET app that uses sevveral data grids, some images, etc. to create the user GUI. I am sending all of the content to a RadEditor, the idea being that the end user can then tweak the content and then use the ExportToPdf function. Does anyone know how I can grab the image from a System.Web.UI.Image control and display it in the RadEditor programatically?

Thanks!

John.
Rumen
Telerik team
 answered on 29 Jan 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?