Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
122 views
I have a masked text box inside an update panel.  The masked text box has hideonblur set to true, and uses an empty message.  When the page loads, the masked text box displays the empty message correctly.  When I type a value in the masked text box, the empty message is correctly hidden.

I then click a button.  The click event of this button is a trigger on the update panel that contains my masked text box.  The page is asynchronously posted back, and when it finishes, the masked text box now displays the empty message instead of the value that was entered!  If you click in the masked text box to give it focus, then tab out, the empty message is now hidden, and the value again displayed.

How can I keep my masked text box inside the update panel and not have it incorrectly hide my value?  The only solution I've found is to remove the empty message AND hideonblur, which causes the mask to always display, which is not what I want.

I am using the standard MS AJAX panels.  Any help is appreciated.
Karl
Top achievements
Rank 1
 answered on 17 Jun 2011
1 answer
42 views
Whenever I perform an ajax postback using the RadAjaxManager, I get a line break added to the top of the page. Everything just shifts down 1 line. This only happens if I use master pages. I tried creating a single aspx form and it works fine. I created a basic masterpage and added a panel for refresh. I've tried moving the panel and button to a content page and using a RadAjaxManagerProxy but I get the same result. Also, this only happens when I publish this to the server. Running on local I do not get the issue.

Clicking on the 'SubmitBtn' refreshes the panel but it drop down 1 line.

<%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Site1.master.vb" Inherits="RadControlsWebApp1.Site1" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
              <Scripts>
                     <%--Needed for JavaScript IntelliSense in VS2010--%>
                     <%--For VS2008 replace RadScriptManager with ScriptManager--%>
                     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                     <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
              </Scripts>
       </telerik:RadScriptManager>
       <script type="text/javascript">
           //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" Skin="Office2007" />
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="SubmitBtn">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="testPanel" LoadingPanelID="LoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
       </telerik:RadAjaxManager>
    <div>
        <asp:Panel runat="server" ID="testPanel">
            test<br />
            <telerik:RadButton ID="SubmitBtn" runat="server" Text="Postback" Skin="Office2007" />
        </asp:Panel>
        <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
          
        </asp:ContentPlaceHolder>
    </div>
    </form>
</body>
</html>
Mira
Telerik team
 answered on 17 Jun 2011
1 answer
96 views
Can I change the behaviour of the spline curve at all and how it figures out the curve?

For example in the attached picture my yaxis values of the purple line are 14, 0, 0, 0, 14, 0

Can i alter the curve to not drop below the 0 line? Is the spline type the right thing for what I am doing here?
Missing User
 answered on 17 Jun 2011
1 answer
110 views
I can get the minor and major tick marks and grid lines sorted, but the base (zero) line is solid black, and can't quite figure out how to style it. Have attached picture to illustrate.
Thanks!

Missing User
 answered on 17 Jun 2011
1 answer
93 views
Hello.

I make a user control and add RadTooltipManager on master page and OnLoad of my control I do next:
    /// <summary>
    /// Tooltip description
    /// </summary>
    public string Description
    {
        get;
        set;
    }   
 
protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
 
        RadToolTipManager tooltipManager;
        tooltipManager = this.Page.Master.FindControl("tooltipManager") as RadToolTipManager;
        if (tooltipManager == null)
        {
            throw new ApplicationException("There are no Tooltip Manager on the page!");
        }           
        tooltipManager.TargetControls.Add(this.hplnkInfo.ClientID,Description,true);          
    }
And when I initialize property Description of my control I see empty tooltip when click on control/
I think TooltipTargetControlCollection.Add(string controlID,string val,bool isClientID) works like "val" is the tooltip which showing by RadTooltipManager near controlID control.
Is it true?
And how can I show different tooltip on different controls using one RadTooltipManager and passing to it tooltip message?

Thank you.
Marin Bratanov
Telerik team
 answered on 17 Jun 2011
1 answer
79 views
Hi,

I have implemented a couple of customized buttons. I have noticed that when the button's functionality is executed that nothing is added to the undo stack (i.e. you cannot undo the action performed with the button). While I know that it is possible to programmatically clear and remove from the undo stack on the client, is there a way for me to programmatically add to the undo stack? I would like to be able to undo the actions that are performed by my custom buttons.

Thanks,
Logan
Rumen
Telerik team
 answered on 17 Jun 2011
4 answers
1.4K+ views
The popup edit window will not load when I have this line of code: "SelectedValue='<%# Bind("LocationID") %>".  My suspicion is because the DropDownList is populating after the control attempts to bind the SelectedValue, but I'm not sure. I have verified that the SelectedValue I am binding is in fact a value that is in the DropDownList. 

Form Template:

       <tr>
            <td>Location:</td>
            <td>
                <asp:DropDownList ID="ddlDevicesLocation" runat="server" SelectedValue='<%# Bind("LocationID") %>'>
                    
                </asp:DropDownList>
            </td>
        </tr>

C# Populate DropDown :: (OnItemDataBound)

protected void DevicesGrid_PopulateFields(object sender, GridItemEventArgs e)
{
            if ((e.Item is GridEditFormItem) && (e.Item.IsInEditMode))
            {
                GridEditFormItem editform = (GridEditFormItem)e.Item;

                // Define fields that we need to work with
                DropDownList locationddl = (DropDownList)editform.FindControl("ddlDevicesLocation");
                DropDownList typeddl = (DropDownList)editform.FindControl("typeddl");
                TextBox PrinterIP = (TextBox)editform.FindControl("PrinterIP");
                TextBox PrinterName = (TextBox)editform.FindControl("PrinterName");
                TextBox PrinterPort = (TextBox)editform.FindControl("PrinterPort");


                // Fill Location DropDown 
                LocationDropDown(locationddl);
}
}


William
Top achievements
Rank 1
 answered on 17 Jun 2011
2 answers
127 views
Hi,
I am using hierarchical gridview of four levels. I want the columns of all tables to be aligned. Currently I am facing issue because of the left most column (containg arrows to expand and collapse). At each level, tables are shifted to right due to that column.
Is there any way to align columns of all four tables (Each child table column should be aligned with parent table column)?
Please reply ASAP...

FYI: I am using telerik 2009 

thanks,
Pooja
Shinu
Top achievements
Rank 2
 answered on 17 Jun 2011
3 answers
314 views
Hi folks,

I'm trying to prompt users to save unsaved fields in pages. The page navigates away even when I call eventArgs.set_cancel(true); 

The idea is that if you type something into the textbox and then click a menu item, you're prompted about the unsaved change.

Could someone point out what I'm missing here? The complete code for the page is shown below.

Thanks,

Ken

<%@ Page Language="VB" AutoEventWireup="false"  %> 
 
<%@ 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></title>  
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> 
 
    <script type="text/javascript">  
        var isDirty = false;  
        var msg = 'This page has unsaved changes.\n\nClick OK to abandon the changes and leave the page.\n\nClick Cancel to stay on the page so you can save your changes.';  
 
        $(document).ready(function() {  
            $(':input').change(function() {  
                if (!isDirty) {  
                    isDirty = true;  
                }  
            });  
 
            //            window.onbeforeunload = function () {  
            //                if (isDirty) {  
            //                 confirm(msg);  
            //                }  
            //            };  
        });  
 
        function doNavigation(targetURL) {  
            if (isDirty == false) {  
                window.location.href = targetURL;  
            }  
            else {  
                if (confirm(msg) == false) {  
                    return false;  
                }  
                else {  
                    window.location.href = targetURL;  
                }  
            }  
        }  
 
        function onClicking(sender, eventArgs) {  
            var item = eventArgs.get_item();  
            var navigateUrl = item.get_navigateUrl();  
            if (navigateUrl && navigateUrl != "#" && isDirty) {  
                var proceed = confirm(msg);  
                if (!proceed) {  
                    eventArgs.set_cancel(true);  
                    return false;  
                }  
            }  
        }                 
    </script> 
 
</head> 
<body> 
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    </telerik:RadScriptManager> 
    <div> 
        <telerik:RadMenu ID="RadMenu1" runat="server" Skin="Web20" OnClientItemClicking="onClicking">  
            <Items> 
                <telerik:RadMenuItem EnableViewState="false" runat="server" NavigateUrl="~/dashboard.aspx" 
                    Text="Dashboard" PostBack="False">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/scheduling.aspx" PostBack="False" 
                            Text="Scheduling" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem PostBack="False" runat="server" NavigateUrl="~/contacts.aspx" 
                    Text="Contacts" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem PostBack="False" runat="server" NavigateUrl="~/items.aspx" Text="Items">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/resetitems.aspx" PostBack="False" 
                            Text="Debug: Reset Items" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/sales.aspx" Text="Sales" PostBack="False" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/purchases.aspx" Text="Purchasing" 
                    PostBack="False" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" Text="Production" NavigateUrl="~/workorders.aspx" 
                    PostBack="False" /> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/projects.aspx" Text="Projects" 
                    PostBack="False">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/files.aspx" PostBack="False" Text="Files" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
                <telerik:RadMenuItem runat="server" NavigateUrl="~/events.aspx" Text="Events" PostBack="False">  
                    <Items> 
                        <telerik:RadMenuItem runat="server" NavigateUrl="~/scheduling.aspx" PostBack="False" 
                            Text="Scheduling" /> 
                    </Items> 
                </telerik:RadMenuItem> 
                <telerik:RadMenuItem IsSeparator="true" /> 
            </Items> 
        </telerik:RadMenu> 
        <br /> 
        <br /> 
        <br /> 
        <telerik:RadTextBox ID="RadTextBox1" Runat="server">  
        </telerik:RadTextBox> 
    </div> 
    </form> 
</body> 
</html> 
 
Kate
Telerik team
 answered on 17 Jun 2011
4 answers
127 views
Hi,

Within a RadGrid I'd use scrollheight to force the grid to occupy a certain height on the page and the pager would be at the foot of that height.

I'd do it like this:
<ClientSettings>
    <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="389" SaveScrollPosition="False"></Scrolling>
</ClientSettings>

Is there an equivalent way to do this with the RadTreeList?

It would be nice to see some documentation that specifically looks at the things that haven't been copied to the rad tree list from the grid view equivalent....

Best Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 17 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?