Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
233 views

I am dynamically creating a floating dock with a fixed ID and fixed UniqueName in the Page_Init event. When I click on a button inside an UpdatePanel to make a callback, I am creating a new dock object, with the same ID and UniqueName, in hope that it will update the existing dock on the client with the new properties.

When outside updatePanel, this works fine (the existing dock gets updated on the client).
When inside updatePanel, and docked, this works fine.
When inside updatePanel, and undocked, I get 2 docks on the client. 

protected void Page_Init(object sender, EventArgs e)  
    {  
       if (!IsPostBack)  
       {  
          RadDock dock = new RadDock();  
          RadDockZone1.Controls.Add(dock);  
          dock.Undock(); // comment this out to make it docked  
          dock.Text = DateTime.Now.ToString();  
          dock.ID = "FIXED";  
          dock.UniqueName = "FIXED";  
       }  
    }  
 
    protected void Button1_Click(object sender, EventArgs e)  
    {  
       RadDock dock = new RadDock();  
       RadDockZone1.Controls.Add(dock);  
       dock.Undock(); // comment this out to make it docked  
       dock.Text = DateTime.Now.ToString();  
       dock.ID = "FIXED";  
       dock.UniqueName = "FIXED";  
    } 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ 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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
      
    </div> 
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">  
       <ContentTemplate> 
          <telerik:RadDockLayout ID="RadDockLayout1" Runat="server">  
            
            
          <telerik:RadDockZone ID="RadDockZone2" Runat="server" Height="300px"   
             Width="300px">  
          </telerik:RadDockZone> 
                    <telerik:RadDockZone ID="RadDockZone1" Runat="server" Height="300px"   
             Width="300px">  
          </telerik:RadDockZone> 
 
          </telerik:RadDockLayout> 
          <asp:Button ID="Button1" runat="server" onclick="Button1_Click"   
             Text="Make Callback" /> 
 
       </ContentTemplate> 
    </asp:UpdatePanel> 
    </form> 
</body> 
</html> 
 
Tervel
Telerik team
 answered on 11 Jan 2008
2 answers
211 views
Heya,

I have both radmenu and and radpanel installed in moss. If i create a link in the navigation to an external site, and select open in new window, this is not passed through to the menus when the page is rendered.

Any ideas how to get thois working. i couldnt see any parameters for the control in sharepoint designer to enable this.

mic
Top achievements
Rank 1
 answered on 11 Jan 2008
2 answers
205 views

I am having problems with trying to set focus to a textbox control after an Ajax call.  Here is the rub, the control is marked as being updated in the call.  The error message I keep getting is "Unexpected call to method or property access".

This is using AjaxManagerProxy from a content page as follows.

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server"></asp:ScriptManagerProxy> 
    <telerik:RadAjaxManagerProxy ID="RadAjaxManager1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnReset">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="editCustNo" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
 

The server button handler looks like this:

        protected void btnReset_Click(object sender, EventArgs e) {  
            //  Reset the page controls to their default state.  
            editCustNo.Text = string.Empty;  
 
            RegisterClientPageControls(editCustNo);  
            _RadAjaxMgr.ResponseScripts.Add("editCustNo.focus();");  
        }  
 
        protected void RegisterClientPageControls(params Control[] controls) {  
            Type typ = this.GetType().BaseType;  
            StringBuilder sb = new StringBuilder();  
 
            sb.AppendLine();  
            sb.AppendLine();  
 
            foreach(Control ctrl in controls)  
                if(ctrl != null)  
                    sb.AppendFormat("var {0} = document.getElementById('{1}');\n", ctrl.ID, ctrl.ClientID);  
 
            sb.AppendLine();  
 
            if(IsAjaxRequest == true) {  
                _RadAjaxMgr.ResponseScripts.Add(sb.ToString());  
                return;  
            }  
 
            this.ClientScript.RegisterStartupScript(typ, Guid.NewGuid().ToString(), sb.ToString(), true);  
        }  
 

Any reason why this shouldn't work?  I have another version where I replace this line 

_RadAjaxMgr.ResponseScripts.Add("editCustNo.focus();");    
 
// ... with ...  
 
_RadAjaxMgr.ResponseScripts.Add(string.Format(SetFocus('{0}');", editCustNo.ClientID));    
 

Where SetFocus() is a JavaScript function like this:

function SetFocus(elementName) {  
    var ctrl = document.getElementById(elementName);  
 
    if(ctrl.focus)  
        ctrl.focus();  
} 
 
... which works like a champ.

So I guess the question is why doesn't the first method work?  I would seem to me that the two methods are functionally equivalent.  Also this is only a very simple example.  I realize there is probably a better way to set focus than this, but the bigger issue is how do I get a javascript reference to an Ajaxified control after the Ajax call?

Any help with this would be greatly appreciated.

Thanks,
Kevin
John Fetherolf
Top achievements
Rank 1
 answered on 10 Jan 2008
2 answers
149 views
Hello there, when I add a custom button it shows up for the default skin, but when I change my sking to WebBlue, it does not show up.  Any ideas?

Herre is my style sheet: Default works, but WebBlue does not.

.rade_toolbar.Default .IESpell

{

background-image: url(http://www.telerik.com/DEMOS/ASPNET/RadControls/Editor/Skins/Default/buttons/CustomDialog.gif);

}

.rade_toolbar.WebBlue .IESpell

{

background-image: url(http://www.telerik.com/DEMOS/ASPNET/RadControls/Editor/Skins/Default/buttons/CustomDialog.gif);

} 

This One WOrks:

<telerik:RadEditor ID="ContentBody" runat="server" ToolsFile="/Scripts/ToolsFile.xml" OnClientLoad="OnClientLoad" Width="700px" Height="345px">

</telerik:RadEditor>

This One Doesn't Work

<telerik:RadEditor ID="ContentBody" runat="server" ToolsFile="/Scripts/ToolsFile.xml" Skin="WebBlue" SkinID="WebBlue" OnClientLoad="OnClientLoad"

Width="700px" Height="345px">

 

</telerik:RadEditor>


 

John
Top achievements
Rank 1
 answered on 10 Jan 2008
5 answers
358 views
can i confirm at this point we must use embedded scripts for prometheus RadEditor?  (am trying to speed up my webpage which is quite slow - downloads ~1.2mb of libraries on the first hit!)

here it is running live - www.techpipeline.net (link will open in a new window)

ps my feedback on the current skins 'customisation' process is I found the documentation/process to be difficult to use (I gave up in the end trying to make the control use the 'skins' directory).  I'm sure with more persistence I would get there but it's not worth the time investment.

keep up the good work..

cheers
ewart

Lini
Telerik team
 answered on 10 Jan 2008
1 answer
99 views
2 questions.

Firstly i have a client, that am making a website for, and its currently going into review via a dev site.  Everything when i look at it works fine [almost see second question].  However the client cannot seem to see the buttons.  Now this is not coming from the client direct, my project manager has been in the same room as them when we initially showed it to them, and the buttons weren't there. [i will confirm if the functionality works though as i have forgotten what he said].  The only thing that we can think of is the firewall between them and our dev site.  Would this be correct and if so, any ideas?

Second question.  Using the prom. editor along with the rad tabs.  It seems that editors hidden behind tabs don't have their editing area activated, until you switch to html mode and back.  And if you too quick, and hit a tab before the editors have fully loaded on the first tab, and go back, those editors have lost their ability to be edited, again until you switch to HTML mode and back...any ideas on this?

Cheers
Rumen
Telerik team
 answered on 10 Jan 2008
3 answers
177 views
Using IE7 and this code:

<telerik:RadTreeView ID="rtv" runat="server" Skin="Default" LoadingStatusPosition="BeforeNodeText" 
    EnableDragAndDrop="True" onnodedrop="rtv_NodeDrop">  
   <collapseanimation duration="100" type="OutQuint" /> 
   <expandanimation duration="100" type="OutQuart" />                     
</telerik:RadTreeView> 

When I try to start the drag I get the transparent node name, which indicates a drag is in process, but after about one second I get the crossed circle telling me I can't drag the node. Interestingly, if I let go of the mouse I still have the transparent node text following the mouse cursor -- even though I'm not holding down the mouse. The same code in FF2 works as expected. The same code (http://www.telerik.com/DEMOS/ASPNET/Prometheus/TreeView/Examples/Functionality/DragAndDropNodes/DefaultCS.aspx) also works with IE7. Any ideas?

Thanks.
Peter Zolja
Top achievements
Rank 1
 answered on 10 Jan 2008
9 answers
548 views
Hi,

I am really confused how to create and use Custom Skin for my grid and other controls.  I have read thru your online documentation but still guiding me to nowhere.  From reading other post, it suggests that I should use Theme.  Are there any solid example on how to create and apply a Theme to my grid control?

I see an example with this
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Theme="Custom" %>

However, I am using ascx file which <%@ Control %> doesn't provide Theme attribute.  How would I apply the Theme?

Chris
Tim
Top achievements
Rank 1
 answered on 10 Jan 2008
3 answers
290 views
We have a RadComboBox inside a RadSlidingPane.  when you press the drop down image nothing happens.

It only drops down if you either
  • Click the text area of the combobox
  • Dock the sliding pane first before clicking the drop down icon.

Browser is Internet Explorer 7, the drop down seems to work as expected in Firefox

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %> 
 
<%@ 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>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <telerik:RadSplitter ID="RadSplitter2" runat="server">  
            <telerik:RadPane ID="RadPane3" runat="server">  
                <telerik:RadSlidingZone ID="RadSlidingZone2" runat="server" ClickToOpen="True">  
                    <telerik:RadSlidingPane ID="RadSlidingPane2" runat="server" Title="moo">  
                        <telerik:RadComboBox ID="RadComboBox2" runat="server" Width="100%">  
                            <CollapseAnimation Duration="200" Type="OutQuint" /> 
                            <ExpandAnimation Type="OutQuart" /> 
                            <Items> 
                                <telerik:RadComboBoxItem Text="moo 1" /> 
                                <telerik:RadComboBoxItem Text="moo 2" /> 
                                <telerik:RadComboBoxItem Text="moo 3" /> 
                                <telerik:RadComboBoxItem Text="moo 4" /> 
                            </Items> 
                        </telerik:RadComboBox> 
                    </telerik:RadSlidingPane> 
                </telerik:RadSlidingZone>              
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="RadSplitBar2" runat="server" /> 
            <telerik:RadPane ID="RadPane4" runat="server">  
            </telerik:RadPane> 
        </telerik:RadSplitter> 
          
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
        </telerik:RadScriptManager> 
    </form> 
</body> 
</html> 
 
Matthew
Top achievements
Rank 1
 answered on 10 Jan 2008
9 answers
262 views
Is anyone else having problems with getting the SelectedValue of a ComboBox Item when used with the ItemsRequested OnDemand approach?  

I did have it working fine when the property was .Value in the prior release but on moving to Q3-2007 1218 it isn't returning a value.

My ComboBox_ItemsRequested code is similar to:

foreach( Customer c in list)
{
comboBox1.Items.Add(new RadComboBoxItem(name, value);
}

Then I'm querying the control on postback with comboBox1.SelectedValue. which is an empty string.  The text property is being set fine.

I've just opened a ticket to telerik (113674) in case its a bug.
Martin
Top achievements
Rank 2
 answered on 10 Jan 2008
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?