Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
64 views
I get an error when trying to invoke a tooltip that .show() is an undefined method.  The specific code is:

var tooltip = $find('OrderToolTip');
tooltip.show();

I am not using jQuery in the application, so can I use the client-side tool tip API without it?  I've had a tool tip working on another project in the past, which also didn't use jQuery, but I no longer have the code.

Marin Bratanov
Telerik team
 answered on 03 Oct 2011
6 answers
287 views
I am trying to cancel the postback of an onItemClick command inside of an onClientItemClick command.

 <script type="text/javascript">  
        function onMenuItemClicked(sender, eventArgs) {  
            alert("Testing");  
            return false;  
        }  
</script> 
 
<telerik:RadContextMenu ID="menuContextMenu" runat="server" OnClientItemClicked="onMenuItemClicked" 
                                        onitemclick="menuContextMenu_ItemClick">  
    <Items> 
       <telerik:RadMenuItem Text="Add Sub Menu" Value="1"></telerik:RadMenuItem> 
       <telerik:RadMenuItem Text="Remove" Value="2"></telerik:RadMenuItem> 
    </Items> 
    <Targets> 
       <telerik:ContextMenuTagNameTarget TagName="menuNode" /> 
    </Targets> 
</telerik:RadContextMenu> 

The javascript runs properly as I get the alert but the post back still occurs even though the function returned false.

I have also tried changing the OnClientItemClicked to  "return onMenuItemClicked();" but this breaks the RadContextMenu all together and I get errors on the page due to improper syntax.

I have also tried adding "window.event.returnValue = false;" to the javascript but have also had no luck with that.

Any help would be greatly appreciated.
Piyush
Top achievements
Rank 1
 answered on 03 Oct 2011
4 answers
402 views
Hi,

I'm using RAD Q3 2009, I have an open window which include some controls (textbox and rad combo), I need to do the following when a user click a close button (asp.net button):
1. return a url to the parent page.
2. redirect parent page to the new url.
3. close the window.

Thank you.
Marin Bratanov
Telerik team
 answered on 03 Oct 2011
1 answer
40 views
When choosing an Thumbnail image in the ImageManager the last row  Open in a new window
is "hidden" for Google Crome. When resizing the font size (ctrl + or -) one can see the last row again.

   
Rumen
Telerik team
 answered on 03 Oct 2011
7 answers
192 views
There is a bewildering number of options that can be placed on list boxes when it comes to drag-and-drop.

It there a combination of options that I can set that enforces the following:

  - Items can be copied from lstAvailableFiles to lstAssignedFiles, either by dragging or by button presses
  - Items can not be dragged in any way from lstAssignedFiles to lstAvailableFiles
  - lstAvailableFiles
 cannot be reoordered
  - Once an item is in lstAssignedFiles, items can be reoordered or removed

I have tried various options, but I cannot seem to make lstAvailableFiles a drag source without making it a drop target as well.

I've enclosed an image of the controls, and here is the current code.

<tr>
   <td>
      <Telerik:RadListBox
          ID="lstAssignedFiles"
          runat="server"
          Width="100%"
          Rows="20"
          SelectionMode="Multiple"
          Height="250px" 
          EnableDragAndDrop="true"
          AllowTransferDuplicates="true"
          AllowReorder="True"
          AllowTransfer="False"
          AllowDelete="True"
          ButtonSettings-Position="Left"
          ButtonSettings-ShowTransfer="False"
          ButtonSettings-ShowTransferAll="False" />
 
   </td>
   <td>
      <Telerik:RadListBox
          ID="lstAvailableFiles"
          runat="server"
          Width="100%"
          Rows="20"
          SelectionMode="Multiple"
          AllowTransfer="true"
          AllowTransferDuplicates="true"
          EnableDragAndDrop="true"
          TransferMode="Copy"
          TransferToID="lstAssignedFiles"
          ButtonSettings-Position="Left"
          Height="250px"  />
   </td>
</tr>



Ricardo Pinto
Top achievements
Rank 1
 answered on 03 Oct 2011
4 answers
118 views
I am using a very simple example I got from your website that loads the radwindow on pageload using the VisibleOnPageLoad property.  It works in firefox and ie8 but not in ie9.  I tried turning off  the "pop-up blocker" but still no luck.  Also I am using the 2009.02.0701.35 version of your library.  Any help would be appreciated.
<telerik:RadScriptManager ID="ScriptManager" runat="server" />
    <telerik:RadWindow
        ID="RadWindow1"
        runat="server"
        Width="350"
        Height="350"
        Behaviors="Default"
        VisibleOnPageLoad="true"
        NavigateUrl="http://www.google.com" />
Marin Bratanov
Telerik team
 answered on 03 Oct 2011
1 answer
267 views
Greetings! 

We have a web application that we use a Rad Window component in to open edit windows for detail information. For the most part they work perfectly, except when it comes to setting the height of the window. These windows are all opened at different sizes depending on properties sent to the javascript as you can see below. Again, the widths all work correctly. 

Below is the javascript used to set the properties of the window:

function openNewCheckWindow(checkId, width, height) {
        //alert(checkId);
        var oWnd = radopen("/PerMar/Users/AddCheckToRequest_Users.aspx?CheckTypeId=" + checkId);
        oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close);
        oWnd.SetWidth(width);
        oWnd.SetHeight(height);
        oWnd.center();
    }

The width, behaviors and centering all work perfectly. The height not so much. Looking at the source in Firebug in Firefox, the tbody tag doesn't appear to receive the style attributes that the table gets, and thus pushes the height of the whole table too high. Attached is a screenshot of what i'm trying to explain. 

If i edit the html in Firefox and add the style to the tbody tag, the window height sizes perfectly, but without the correct style attribute - you can see the extra white space in the screenshot.

It seems to affect Firefox and Chrome alike, and we are running the RadControls for Ajax v.2011.2.712.35. I noticed in another post someone recommended ensuring the doctype was correct on the page, and ours is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

IE (oddly enough) shows the RadWindow correctly, which is a first..

Is there something i'm missing?

Thanks,
Paul Wakeman
Marin Bratanov
Telerik team
 answered on 03 Oct 2011
5 answers
88 views

I have a Tab with 2 panels.  And a Multipage control with 2 pageviews.  Each page view has a asp:button on it that I use AJAX to save the data back to the server.  Once the asp:button event is called, the tab strip stops working, will not change values and no page view change.

From reading other post I tried setting the autopost to false and changing the cause validation to false, but with no luck...  Please help...

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="cphBody">
    <div id="cbody">
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" ClientIDMode="Static">
        <telerik:RadTabStrip ID="rtsProfile" runat="server" MultiPageID="rmpTabStripPanels"
            SelectedIndex="0" Skin="Outlook" ClientIDMode="Static" CausesValidation="False">
            <Tabs>
                <telerik:RadTab runat="server" Text="User Profile" Selected="True" PostBack="False">
                </telerik:RadTab>
                <telerik:RadTab runat="server" Text="Change Password" PostBack="False">
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
            <telerik:RadMultiPage ID="rmpTabStripPanels" runat="server" SelectedIndex="0">
                <telerik:RadPageView ID="rpvUserProfile" runat="server">
                    <table>
                        <tr valign="top">
                            <td colspan="3">
                                <h2>
                                    User Profile</h2>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="3">
                                <p>
                                    Please fill in the information below. This information will be inserted into your
                                    letters to your bank and creditors. My Road To Recovery will email you alerts and
                                    other communications when you have actions that need to be taken. If you wish to
                                    receive SMS text messages, please provide your cell phone number and click the “YES”
                                    box next to the SMS text option.
                                </p>
                                <p>
                                    You can edit your information at any time. Please be sure to click the “Save” button
                                    at the bottom of the page.</p>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td style="width: 225px;">
                                <label>
                                    *First Name</label><br />
                                <asp:TextBox ID="txtFirstName" runat="server" SkinID="TextBox" Width="210" ClientIDMode="Static"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" Display="Dynamic" ControlToValidate="txtFirstName"
                                    ErrorMessage="First name is required." ValidationGroup="SaveRecord" CssClass="error_message"
                                    SetFocusOnError="true">
                                </asp:RequiredFieldValidator>
                            </td>
                            <td style="width: 225px;">
                                <label>
                                    *Last Name</label><br />
                                <asp:TextBox ID="txtLastName" runat="server" SkinID="TextBox" Width="210" ClientIDMode="Static"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvLastName" runat="server" Display="Dynamic" ControlToValidate="txtLastName"
                                    ErrorMessage="Last name is required." ValidationGroup="SaveRecord" CssClass="error_message"
                                    SetFocusOnError="true">
                                </asp:RequiredFieldValidator>
                            </td>
                            <td style="width: 250px;">
                                <label>
                                    Date of Birth (MM/DD/YYYY)</label><br />
                                <telerik:RadDateInput ID="txtDOB" runat="server" DateFormat="MM/dd/yyyy" SkinID="RadDateInput"
                                    Width="210" MinDate="1900-01-01" ClientIDMode="Static">
                                </telerik:RadDateInput><br />
                            </td>
                        </tr>
                        <tr valign="top">
                            <td>
                                <label>
                                    Social Security Number</label><br />
                                <telerik:RadMaskedTextBox ID="txtSSNumber" runat="server" SkinID="RadMaskedTextBox"
                                    Width="212" Mask="###-##-####" ClientIDMode="Static">
                                </telerik:RadMaskedTextBox><br />
                                <asp:RegularExpressionValidator ID="revSSN" runat="server" Display="Dynamic" ControlToValidate="txtSSNumber"
                                    ErrorMessage="Valid social security number is required." ValidationExpression="\d{3}-\d{2}-\d{4}"
                                    ValidationGroup="SaveRecord" CssClass="error_message" SetFocusOnError="true">
                                </asp:RegularExpressionValidator>
                            </td>
                            <td>
                                <label>
                                    *Telephone Number</label><br />
                                <telerik:RadMaskedTextBox ID="txtTelephoneNumber" runat="server" SkinID="RadMaskedTextBox"
                                    Width="212" Mask="(###)-###-####" ClientIDMode="Static">
                                </telerik:RadMaskedTextBox><br />
                                <asp:RegularExpressionValidator ID="revTelephoneNumber" runat="server" Display="Dynamic"
                                    ControlToValidate="txtTelephoneNumber" ErrorMessage="Valid telephone number is required."
                                    ValidationExpression="\(\d{3}\)-\d{3}-\d{4}" ValidationGroup="SaveRecord" CssClass="error_message"
                                    SetFocusOnError="true">
                                </asp:RegularExpressionValidator>
                            </td>
                            <td align="left">
                                <table width="100%" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td colspan="2" align="left">
                                            <label>
                                                Cell Phone Number</label><br />
                                        </td>
                                    </tr>
                                    <tr valign="bottom">
                                        <td align="left">
                                            <telerik:RadMaskedTextBox ID="txtCellPhoneNumber" runat="server" SkinID="RadMaskedTextBox"
                                                Width="105" Mask="(###)-###-####" ClientIDMode="Static">
                                            </telerik:RadMaskedTextBox>
                                        </td>
                                        <td align="left" style="white-space: nowrap;">
                                            <asp:CheckBox ID="chkSMSOptionOut" runat="server" Text="Receive Text Messages" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" align="left">
                                            <asp:RegularExpressionValidator ID="revCellPhoneNumber" runat="server" Display="Dynamic"
                                                ControlToValidate="txtCellPhoneNumber" ErrorMessage="Valid cell phone number is required."
                                                ValidationExpression="\(\d{3}\)-\d{3}-\d{4}" ValidationGroup="SaveRecord" CssClass="error_message"
                                                SetFocusOnError="true">
                                            </asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="2">
                                <table cellpadding="0" cellspacing="0" width="100%">
                                    <tr valign="bottom">
                                        <td align="left" style="white-space: nowrap;">
                                            <label>
                                                *Email</label><br />
                                            <asp:TextBox ID="txtEmail" runat="server" SkinID="TextBox" Width="212" ClientIDMode="Static"> </asp:TextBox>
                                            <asp:CheckBox ID="chkEmailOptionOut" runat="server" Text="Receive Email Messages"
                                                ClientIDMode="Static" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:RequiredFieldValidator ID="rfvEmail" runat="server" Display="Dynamic" ControlToValidate="txtEmail"
                                                ErrorMessage="Valid email address is required." ValidationGroup="SaveRecord"
                                                CssClass="error_message" SetFocusOnError="true">
                                            </asp:RequiredFieldValidator><asp:RegularExpressionValidator ID="revEmail" runat="server"
                                                Display="Dynamic" ControlToValidate="txtEmail" ErrorMessage="Valid email address is required."
                                                ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
                                                ValidationGroup="SaveRecord" CssClass="error_message" SetFocusOnError="true">
                                            </asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <label>
                                    *Street Address</label><br />
                                <asp:TextBox ID="txtStreetAddress" runat="server" Width="212" ClientIDMode="Static"
                                    SkinID="TextBox">
                                </asp:TextBox><br />
                            </td>
                        </tr>
                        <tr valign="top">
                            <td>
                                <label>
                                    City</label><br />
                                <telerik:RadTextBox ID="txtCity" runat="server" Width="212" ClientIDMode="Static"
                                    SkinID="RadTextBox">
                                </telerik:RadTextBox><br />
                            </td>
                            <td>
                                <label>
                                    State</label><br />
                                <telerik:RadTextBox ID="txtState" runat="server" Width="212" ClientIDMode="Static"
                                    SkinID="RadTextBox">
                                </telerik:RadTextBox><br />
                            </td>
                            <td>
                                <label>
                                    ZIP Code</label><br />
                                <telerik:RadMaskedTextBox ID="txtZipCode" runat="server" SkinID="RadMaskedTextBox"
                                    AutoPostBack="true" Width="210" Mask="#####" ClientIDMode="Static">
                                </telerik:RadMaskedTextBox><br />
                                <asp:RegularExpressionValidator ID="revZipCode" runat="server" Display="Dynamic"
                                    ControlToValidate="txtZipCode" ErrorMessage="Valid zip code is required." ValidationExpression="\d{5}"
                                    ValidationGroup="SaveRecord" CssClass="error_message" SetFocusOnError="true">
                                </asp:RegularExpressionValidator><asp:Label ID="lblZipError" runat="server" Text="Valid zip code is required."
                                    CssClass="error_message" Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="3" align="left">
                                <asp:Button ID="btnSave" runat="server" Text="Save" ValidationGroup="SaveRecord" /><asp:Label
                                    ID="lblError" runat="server" ForeColor="Red"></asp:Label>
 
                            </td>
                        </tr>
                    </table>
                </telerik:RadPageView>
                <telerik:RadPageView ID="rpvChangePassword" runat="server">
                    <table width="100%">
                        <tr valign="top">
                            <td>
                                <h2>
                                    Change Password</h2>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td>
                                <p>
                                    You can change your password at any time. Simply enter your old password and then
                                    enter your new password twice. Be sure to click the “Save” button on the bottom
                                    of the page.
                                </p>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <label>
                                    Old Password</label>
                                <br />
                                <asp:TextBox ID="txtOldPassword" runat="server" TextMode="Password" SkinID="TextBox"
                                    Width="200"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvOldPassword" runat="server" Display="Dynamic"
                                    ControlToValidate="txtOldPassword" ErrorMessage="Old password is required." ValidationGroup="SavePassword"
                                    CssClass="error_message" SetFocusOnError="true"></asp:RequiredFieldValidator><asp:CustomValidator
                                        ID="cusOldPassword" runat="server" ControlToValidate="txtOldPassword" CssClass="error_message"
                                        Display="Dynamic" ErrorMessage="Incorrect Old Password entered." SetFocusOnError="True"
                                        ValidationGroup="SavePassword"></asp:CustomValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <label>
                                    New Password</label>
                                <br />
                                <asp:TextBox ID="txtNewPassword" runat="server" TextMode="Password" SkinID="TextBox"
                                    Width="200"></asp:TextBox>
                                <label style="font-weight: normal;">
                                    (Min 5 characters and have at least 1 number or symbol)</label>
                                <br />
                                <asp:RequiredFieldValidator ID="rfvNewPassword" runat="server" Display="Dynamic"
                                    ControlToValidate="txtNewPassword" ErrorMessage="New password is required." ValidationGroup="SavePassword"
                                    CssClass="error_message" SetFocusOnError="true"></asp:RequiredFieldValidator>
                                <asp:RegularExpressionValidator ID="revPassword" runat="server" Display="Dynamic"
                                    ControlToValidate="txtNewPassword" ErrorMessage="Min 5 characters and have at least 1 number or symbol is required."
                                    ValidationExpression="^.*(?=.*[a-zA-Z]{5,})((?=.*\d)|(?=.*\W)).*$" ValidationGroup="SavePassword"
                                    CssClass="error_message" SetFocusOnError="true">
                                </asp:RegularExpressionValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <label>
                                    Confirm New Password</label>
                                <br />
                                <asp:TextBox ID="txtNewPasswordConfirm" runat="server" TextMode="Password" SkinID="TextBox"
                                    Width="200"></asp:TextBox><br />
                                <asp:RequiredFieldValidator ID="rfvNewPasswordConfirm" runat="server" Display="Dynamic"
                                    ControlToValidate="txtNewPasswordConfirm" ErrorMessage="Confirm password is required."
                                    ValidationGroup="SavePassword" CssClass="error_message" SetFocusOnError="true"></asp:RequiredFieldValidator><asp:CompareValidator
                                        ID="cvNewPasswordConfirm" runat="server" Display="Dynamic" ControlToValidate="txtNewPasswordConfirm"
                                        ControlToCompare="txtNewPassword" ErrorMessage="Confirm password do not match."
                                        ValidationGroup="SavePassword" CssClass="error_message" SetFocusOnError="true">
                                    </asp:CompareValidator>
                            </td>
                        </tr>
                        <tr>
                            <td align="left">
                                <asp:Button ID="btnSavePassword" runat="server" Text="Save" ValidationGroup="SavePassword" />
                      
                            </td>
                        </tr>
                    </table>
                </telerik:RadPageView>
            </telerik:RadMultiPage>
        </telerik:RadAjaxPanel>
    </div>
</asp:Content>


Here is the server code

Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSave.Click
    Try
        Dim dsCares As DataSet
        Dim drClient As DataRow
 
 
        dsCares = m_WSClient.client_get_only_Ex(m_SessionID, m_ClientID, m_ResultMsg)
        If IsDataTableValid(dsCares) = False Then
            lblError.Text = "Client ID Not found in database. Please contact Customer Care."
            Exit Try
        End If
 
        drClient = dsCares.Tables(0).Rows(0)
 
        drClient!FirstName = txtFirstName.Text
        drClient!LastName = txtLastName.Text
        drClient!StreetAddress = txtStreetAddress.Text
        drClient!StreetCity = txtCity.Text
        drClient!StreetState = txtState.Text
        drClient!StreetZip = txtZipCode.Text
        drClient!SSN = txtSSNumber.TextWithLiterals
        drClient!Phone1 = txtTelephoneNumber.TextWithLiterals
        drClient!MobilePhone = txtCellPhoneNumber.TextWithLiterals
        drClient!Email = txtEmail.Text
        drClient!BirthDate = txtDOB.SelectedDate
 
        drClient!EmailOptOut = chkEmailOptionOut.Checked
        drClient!SMSOptOut = chkSMSOptionOut.Checked
 
        m_WSClient.client_update(m_SessionID, dsCares, m_ClientID, m_ResultMsg)
 
        'Client_AddHistory(Session, String.Format("Client Updated User Profile [{0}]", txtEmail.Text))
 
        'tipSave.Show()
 
    Catch ex As Exception
        GlobalErrorHandler(System.Reflection.MethodBase.GetCurrentMethod(), ex)
        'Debug.WriteLine("Error:" + ex.ToString)
    End Try
End Sub
 
 
Protected Sub btnSavePassword_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSavePassword.Click
    Try
        Dim dtPasswd As WS_CLIENT.dsClients.ClientSecurityDataTable
 
        dtPasswd = m_WSClient.ClientSecurity_Filter_ClientID(m_SessionID, m_ClientID, m_ResultMsg)
        If IsDataTableValid(dtPasswd) = False Then
            cusOldPassword.ErrorMessage = "Unable to get old password. Contact Customer Care!"
            cusOldPassword.IsValid = False
            Exit Try
        End If
        If dtPasswd(0).ClientPassword <> txtOldPassword.Text Then
            cusOldPassword.ErrorMessage = "Incorrect Old Password entered."
            cusOldPassword.IsValid = False
            Exit Try
        End If
        ' password is valid
 
        Dim Ret = m_WSClient.ClientSecurity_Update(m_SessionID, m_ClientID, txtNewPassword.Text, 0, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_ResultMsg)
        ' tipSavePassword.Show()
 
    Catch ex As Exception
        GlobalErrorHandler(System.Reflection.MethodBase.GetCurrentMethod(), ex)
        'Debug.WriteLine("Error:" + ex.ToString)
    End Try
End Sub


Kate
Telerik team
 answered on 03 Oct 2011
1 answer
107 views
Hi,

I am searching for this functionality from many days. Radgrid provides the functionality to select multiple rows when I set AllowMultiRowSelection = true.

I can select multiple rows by holding shift or control key and click which I dont want. I want to use either by using shift key or control key. Is there any workaround for this?

Regards,
Aradhya
Shinu
Top achievements
Rank 2
 answered on 03 Oct 2011
1 answer
90 views
Is there no autobinding for drag\drop using an OpenAccess datasource or am I just missing the property\setting?

If there isn't can this be a PITS issue please :)  Way easier like the RadTreeList to drag\drop than having to manually handle OnDrop
Nikolay Tsenkov
Telerik team
 answered on 03 Oct 2011
Narrow your results
Selected tags
Tags
+124 more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?