Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
175 views
Hi,

I am using Telerik version Q2 2009. I have List box. it contains items. when i type a Text in Editor and select item from List box it will paste next to whatever i typed.

E.g  Test name : (someText)

In the above example,  I have typed "Test name"  manually in the editor and i have selected "some Text" from List box.

it should be paste next to "Test name"





Please give me the solution ASAP.

Regards

Rahul




 
Rumen
Telerik team
 answered on 18 Nov 2009
2 answers
193 views
Hello,

I have a problem with all RadComboBoxes that I use with property "AutoPostBack=true".
I can select an item in the list but after the postBack all controls of my page generate a WebPage error when I try to focus on one of them.

The first picture describe the window prompted when I try to give focus on another control of the page and the second picture is the detail showed by the script Debugger in IE.

Thank you for your help.


Quantesys IT
Top achievements
Rank 1
 answered on 18 Nov 2009
8 answers
237 views
Is it possible to get the value of an asp:TextBox that is a target of a RadInputManager in the OnBlur event?  Every thing I've tried, I get an empty string result.  These are methods I have tried:

                    function OnBlur(sender, eventArgs) { 
                        alert(eventArgs.get_targetInput().get_value()); 
                    } 

                    function OnBlur() { 
                        var manager = $find("<%= InputManager.ClientID %>"); 
                        var numericTextBox = manager.get_targetInput("<%= TestFees.ClientID %>"); 
                        alert(numericTextBox.get_value()); 
                    } 
Chris
Top achievements
Rank 1
 answered on 18 Nov 2009
0 answers
113 views
I am using RadScheduler in Radsplitter (as per Telerik WebMail demo) and I want to remove some of the borders that would otherwise lay adjecent to RadSplitBar. I managed to remove the top, left & right border from RadScheduler by using a custom skin, but when I do this, the advanced input form does not work as expected: resources dropdown has no background and the items cannot be selected. Please help.
Thanks
Tomas von Peltzer
Top achievements
Rank 1
 asked on 18 Nov 2009
1 answer
467 views
Hi,

We have an in-house CMS. Various functionality happens in modules. Any number and configuration (including duplicates) of modules can be added to a page. Users with appropriate permissions can open a RadWindow that contains a page where they can update the settings for that module.

Currently, when they close the window the whole page reloads with their updated settings. This works but we would like to make it better.

However, we would like to modify this behavior. Each module is wrapped in an update panel. When the RadWindow closes only the appropriate update panel is updated. Even then, if possible it should only update if they click the "update" button in the window and not if they click the "cancel" button or the "X" on the RadWindow.

I have found one solution. However, it seems "hackish".
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Random_String_Control.ascx.cs" Inherits="AJAX_Test.Random_String_Control" %> 
 
<asp:UpdatePanel UpdateMode="Conditional" runat="server"> 
    <ContentTemplate> 
        <script type="text/javascript"> 
            function clientClose_<%= Refresh_Random_String.ClientID %>(sender, args) { 
                document.getElementById('<%= Refresh_Random_String.ClientID %>').click(); 
            } 
        </script> 
        <asp:Literal runat="server" ID="Random_String" /> 
        <asp:Button ID="Refresh_Random_String" runat="server" OnClick="Refresh_Random_String_Click" Text="Refresh Random String" /> 
        <rad:RadWindow ID="Window" runat="server" Modal="true" NavigateUrl="http://google.ca" /> 
        <asp:Button ID="Open_Window" runat="server" Text="Open Window" OnClick="Open_Window_Click" /> 
    </ContentTemplate> 
</asp:UpdatePanel> 

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
namespace AJAX_Test 
{ 
    public partial class Random_String_Control : System.Web.UI.UserControl 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if(!IsPostBack) 
                Random_String.Text = Guid.NewGuid().ToString(); 
            Window.VisibleOnPageLoad = false; 
            Window.OnClientClose = "clientClose_" + Refresh_Random_String.ClientID; 
        } 
 
        protected void Open_Window_Click(object sender, EventArgs e) 
        { 
            Window.VisibleOnPageLoad = true; 
        } 
 
        protected void Refresh_Random_String_Click(object sender, EventArgs e) 
        { 
            Random_String.Text = Guid.NewGuid().ToString(); 
        } 
    } 
} 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="AJAX_Test._Default" %> 
 
<!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> 
</head> 
<body> 
    <form id="form1" runat="server"> 
        <asp:ScriptManager runat="server" /> 
        <div> 
            1 : 
            <asp:PlaceHolder ID="One" runat="server" /> 
        </div> 
        <br /> 
        <div> 
            2 : 
            <asp:PlaceHolder ID="Two" runat="server" /> 
        </div> 
        <br /> 
        <div> 
            3 : 
            <asp:PlaceHolder ID="Three" runat="server" /> 
        </div> 
    </form> 
</body> 
</html> 
 

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Web; 
using System.Web.UI; 
using System.Web.UI.WebControls; 
 
namespace AJAX_Test 
{ 
    public partial class _Default : System.Web.UI.Page 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            One.Controls.Add(Page.LoadControl("Random_String_Control.ascx")); 
            Two.Controls.Add(Page.LoadControl("Random_String_Control.ascx")); 
            Three.Controls.Add(Page.LoadControl("Random_String_Control.ascx")); 
        } 
    } 
} 
 




Is there an easier way to do this?

Thanks,
Jeff Paetkau

PS: If you attempt to attach a zip file, you get the error "File is not of correct type." However, there does not appear to be any way to remove the file. It seems the only way to continue posting is to attach an image.
Georgi Tunev
Telerik team
 answered on 18 Nov 2009
3 answers
201 views
Hi ,
am balaji 

I Have used  Rad Treeview  encapsulated in a Rad ajax panel in my Project.
Here i do different transaction such as drag and drop,context menu,node click and so on.
But everything under Rad ajax panel.
Actually i have Treeview path stored as a datasource in an array.
Am assigning the Path and Storing the Value in Rad Tree node while clicking and dragging that node to destination node.

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1" EnableAJAX="false" EnableHistory="false" > 
                                                <telerik:RadTreeView ID="Reportview" runat="server" AllowNodeEditing="True"    
                                                    EnableDragAndDrop="True" OnNodeExpand="RadTreeview1_NodeExpand" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick"   
                                                    OnClientNodeClicked="nodeClicked"   
                                                    OnClientContextMenuShowing="onClientContextMenuShowing"   
                                                    OnNodeEdit="RadTreeView1_NodeEdit" OnNodeDrop="RadTreeView1_HandleDrop" > 
                                                    <ContextMenus> 
                                                        <telerik:RadTreeViewContextMenu Skin="Outlook" ID="FolderContextMenu" runat="server">  
                                                           <%-- <WebServiceSettings Method="LoadFolderitems" Path="WebService.asmx" /> 
                                                             <WebServiceSettings Method="LoadReportitems" Path="WebService.asmx" />--%> 
                                                              <Items> 
                                                              <telerik:RadMenuItem Value="Create Folder" Text="Create Folder" ImageUrl="img/Outlook/10.gif">  
                                                              </telerik:RadMenuItem> 
                                                              <telerik:RadMenuItem Value="Copy Policies" Text="Copy Policies">  
                                                              </telerik:RadMenuItem> 
                                                              <telerik:RadMenuItem Value="Paste Policies" Text="Paste Policies" Enabled="false">  
                                                              </telerik:RadMenuItem> 
                                                              </Items> 
                                                        </telerik:RadTreeViewContextMenu> 
                                                          
                                                        <telerik:RadTreeViewContextMenu Skin="Outlook" ID="ReportContextMenu" runat="server">  
                                                           <%-- <WebServiceSettings Method="LoadFolderitems" Path="WebService.asmx" /> 
                                                             <WebServiceSettings Method="LoadReportitems" Path="WebService.asmx" />--%> 
                                                              <Items> 
                                                                
                                                              <telerik:RadMenuItem Value="Copy Policies" Text="Copy Policies">  
                                                              </telerik:RadMenuItem> 
                                                               <telerik:RadMenuItem Value="Paste Policies" Text="Paste Policies" Enabled="false">  
                                                              </telerik:RadMenuItem> 
                                                              </Items> 
                                                        </telerik:RadTreeViewContextMenu> 
                                                    </ContextMenus> 
                                                    <Nodes> 
                                                        <telerik:RadTreeNode runat="server" Expanded="True" ExpandMode="ServerSideCallBack" 
                                                            Text="Root" Value="/" ImageUrl="~/images/12.gif">  
                                                        </telerik:RadTreeNode> 
                                                    </Nodes> 
                                                </telerik:RadTreeView> 
                                                    
                                                <input type="hidden" id="status" runat="server" /> 
                                                <input type="hidden" id="draggednodepath" runat="server" /> 
                                                <input type="hidden" id="dropstatus" runat="server" /> 
                                                <input type="hidden" id="Nodeid" runat="server" /> 
                                               </telerik:RadAjaxPanel> 
 
In This Treeview i deal with lot of Operations such as drag and drop mcontext menu items as you can see in the Above Respective events.  
OnNodeExpand="RadTreeview1_NodeExpand" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick"   
                                                    OnClientNodeClicked="nodeClicked"   
                                                    OnClientContextMenuShowing="onClientContextMenuShowing"   
 

Here is the RadHandle_Drop Event where i assign Node value the  Path.

 
  protected void RadTreeView1_HandleDrop(object sender, RadTreeNodeDragDropEventArgs e)  
    {  
        RadTreeNode sourceNode = e.SourceDragNode;  
        RadTreeNode destNode = e.DestDragNode;  
          
        RadTreeViewDropPosition dropPosition = e.DropPosition;  
        try  
        {  
            if (sourceNode.TreeView.SelectedNodes.Count <= 1)  
            {  
                if (destNode.ToolTip != "Report")  
                {  
                    if (!sourceNode.IsAncestorOf(destNode))  
                    {  
                        string srcvalue = sourceNode.FullPath;  
                        string target = destNode.FullPath;  
 
                        if (!target.Contains(destNode.Text))  
                        {  
                            targettarget = target + destNode.Text;  
                        }  
 
                        if (srcvalue.StartsWith("Root"))  
                        {  
                            srcvaluesrcvalue = srcvalue.Replace("Root", "");  
                            //srcvaluesrcvalue=srcvalue.Substring(0,srcvalue.LastIndexOf("/"));  
                        }  
 
                        Uri uri = new Uri(Request.Cookies["reporturl"].Values["uri"].ToString());  
                        rs.Url = Request.Cookies["reporturl"].Values["uri"].ToString();  
                        NetworkCredential netCredential = new NetworkCredential(Request.Cookies["Reportcredent"].Values["Username"].ToString(), Request.Cookies["Reportcredent"].Values["pwd"].ToString(), Request.Cookies["Reportcredent"].Values["Domain"].ToString());  
                        ICredentials credential = netCredential.GetCredential(uri, "Basic");  
                        rs.Credentials = credential;  
                        if (target.LastIndexOf("/") > 0)  
                        {  
                            targettarget = target + "/" + srcvalue.Substring(srcvalue.LastIndexOf("/"));  
                            targettarget = target.Replace("//", "/").Replace("//", "/");  
                            targettarget = target.Replace("Root", "");  
                            if (sourceNode.ToolTip == "Folder")  
                            {  
                                Cache["NodeType"] = "Folder";  
                            }  
                            else  
                            {  
                                Cache["NodeType"] = "Report";  
                            }  
                        }  
                        else  
                        {  
                            if (target.StartsWith("Root"))  
                            {  
                                targettarget = target.Replace("Root", "");  
                            }  
 
 
                            target = srcvalue.Substring(srcvalue.LastIndexOf("/"));  
 
                            welcomemsg.Visible = false;  
                            if (sourceNode.ToolTip == "Folder")  
                            {  
                                Cache["NodeType"] = "Folder";  
                            }  
                            else  
                            {  
                                Cache["NodeType"] = "Report";  
                            }  
 
 
 
 
 
                        }  
 
 
 
 
 
 
 
 
 
 
                        rs.MoveItem(srcvalue, target);  
 
                        sourceNode.Owner.Nodes.Remove(sourceNode);  
                        destNode.Nodes.Add(sourceNode);  
                        draggednodepath.Value = target;  
                        destNode.Value = target;  
                         
                        destNode.Category = target;  
                        destNode.Expanded = true;  
                        dropstatus.Value = "true";  
 
                         
                    }  
 
                }  
                else  
                {  
                    welcomemsg.Visible = true;  
                    Addpane.Visible = false;  
                    rightpane.Visible = false;  
                    rightpanepolicies.Visible = false;  
                    welcomemsg.Text = "You cant Drag And Drop Report to a Report";  
                }  
                  
            }  
     
 
 
        }  
        catch (Exception ex)  
        {  
            if (ex.Message.Contains("already exists"))  
            {  
                welcomemsg.Visible = true;  
                Addpane.Visible = false;  
                rightpane.Visible = false;  
                rightpanepolicies.Visible = false;  
                welcomemsg.Text = "There cannot be a Report with the Same name in a Folder";  
            }  
            else  
            {  
                Util.LogException(ex);  
            }  
              
        }  
                sourceNode.TreeView.ClearSelectedNodes();  
    }  
 

when i try to retrieve the Exact path on some other Node Click event am not getting the Recent Value that is assigned in the Handle Drop event.
due to this am getting lot of uncertainities.
The Value is not Persistent  and not committed.
Is there any Way or code to enable it.
Can any one Help me .
Thanks
Regards
N.Balaji

 

 

Veselin Vasilev
Telerik team
 answered on 18 Nov 2009
1 answer
92 views
HI

I dont know if have a bug on radcontrol or on my code, but, i add a custom command to raddock and i can see the icon only after move this dock.

Can you help-me please ?

 
 Private Function CreateRadDockFromState(ByVal state As DockState) As RadDock 
            Dim dock As New RadDock() 
 
            dock.DockMode = DockMode.Docked 
            dock.ID = String.Format("RadDock{0}", state.UniqueName) 
            dock.ApplyState(state) 
 
            Dim botaoEditar As DockCommand = New DockCommand 
            botaoEditar.Name = "EDITAR" 
            botaoEditar.Text = "editar" 
            botaoEditar.AutoPostBack = True 
 
            AddHandler dock.Command, AddressOf dock_Command 
 
            dock.Commands.Add(botaoEditar) 
            dock.Commands.Add(New DockCloseCommand()) 
            dock.Commands.Add(New DockExpandCollapseCommand()) 
 
            Return dock 
        End Function 
 

Pero
Telerik team
 answered on 18 Nov 2009
1 answer
58 views
Hi,

So very late to the party here, just upgraded to latests 09 release only to realize that WebBlue skin from our 08 Q3 release is no longer the same...and the new one is terrible.

Read through some threads/blog posts here about it.

So  besides All RadControls Q3 2008 Skins Are Now Compatible with the Q1 2009 Release

Are there are no other ways to embed the old versions of themes into an assembly or something like that?

instead of manual per page registration? Or is there?  And I just can't find it?

After nearly a year and several Q releases, I'd imagine you guys, Telerik, could have converted older themes and embedded them with the new ones?

Thanks
Ivo
Telerik team
 answered on 18 Nov 2009
1 answer
89 views
Hi, I am using the raddock control but when the tried to set the font on the title in the css nothing happened. so I checked the html code generated only to find that the class="rdTitle" is missing. the dockhandle is set to TitleBar, dockmode is default. here is the code

 

 

 

<telerik:RadDock ID="RadDock1" Runat="server" Width="100%"

 

 

 

Title="Message">

 

 

 

<ContentTemplate>

 

 

 

<br />

 

 

 

<asp:Button ID="Button1" runat="server" Text="New message"

 

 

 

CssClass="btnSmall" Width="162px" />

 

 

 

<br />

 

 

 

<br />

 

 

 

<asp:Button ID="Button2" runat="server" Text="Open message"

 

 

 

CssClass="btnSmall" Width="162px" />

 

 

 

<br />

 

 

 

</ContentTemplate>

 

 

 

</telerik:RadDock>

 


HTML code from browser

<tr class="rdTop">
    <td unselectable="on" class="rdLeft">&nbsp;</td>
    <td class="rdCenter"><div id="ctl00_pageContent_RadDock1_T" class="rdTitleBar">
     <em>Message</em><ul class="rdCommands"><li><a title="Collapse"><span  class="rdCollapse">&nbsp;</span></a></li><li><a title="Close"><span class="rdClose">&nbsp;</span></a></li></ul>
    </div></td>
    <td unselectable="on" class="rdRight">&nbsp;</td>
   </tr>

you can see that the <em>Message</em> should be <em class="rdTitle">Message</em> but is not.

many thanks.

Sean
Pero
Telerik team
 answered on 18 Nov 2009
3 answers
177 views
We have a Q1 2009 RadToolbar, with a Radcombobox load-on-demand autosuggest search input in one template button. In the next, we have a RadToolBarbutton acting as the Submit search button.  This setup has worked fine for a long time, however recently switching our Dotnetnuke page state persistence to 'Memory' from 'Page' results in the unusual behaviour that clicking the search submit button, does not seem to fire the server-side button click event, it just does a postback and nothing happens.

Strangely,the exact same code works on a child dotnetnuke portal, just not on the parent portal. We would really like to use Memory state persistence as it delivers much better clientside performance, and so far this button not posting back seems to be the only hang-up. 

Can someone please say why this button event would no longer fire, based on in-page viewstate vs memory/session viewstate? It is Dotnetnuke 4.9.1.

.ascx:
<%@ Control language="vb" Inherits="MySite.Modules.Search.ViewSearch" CodeFile="ViewSearch.ascx.vb" AutoEventWireup="false" %><%@ Register TagPrefix="dnn" TagName="SCBreadcrumb" Src="~/DesktopModules/SCBreadcrumb/SCBreadcrumb.ascx" %><script type="text/javascript">function OnASClientItemsRequestFailedHandler(sender, eventArgs){eventArgs.set_cancel(true);}var myTimer=null;var isTimerRunning=false;function KeyPressHandler(comboBox,eventArgs){if(isTimerRunning){stopTimer();}myTimer=setTimeout('requestItems()',500);isTimerRunning=true;}function RequestingHandler(sender, eventArgs){if (sender.get_text().length < 3){eventArgs.set_cancel(true);}}function stopTimer(){if(isTimerRunning){clearTimeout(myTimer);timerRunning=false;}};function RadComboKeyPress(sender, eventArgs) {var keyCode = eventArgs.get_domEvent().keyCode;if (keyCode == 13) {var toolbar1 = $find("<%= RadToolBarSearch.ClientID %>");var templateButton = toolbar1.findItemByValue("MainSearch");templateButton.click();}}</script><table width="100%"><tr><td align="left"><telerik:RadToolBar runat="server" ID="RadToolBarSearch" Skin="Telerik" EnableEmbeddedSkins="False" EnableEmbeddedBaseStylesheet="False" OnButtonClick="RadToolBarSearch_ButtonClick" EnableLoadOnDemand="False" EnableViewstate="False" style="width:100%;display: block; float: none;min-width:500px;"><Items><telerik:RadToolBarButton id="SearchTemplate" Value="TemplateTextBox" Text="BasicSearch"><ItemTemplate><telerik:RadComboBox Skin="Hay" id="RadComboBoxAS" Runat="server" Width="215px"  EnableItemCaching="True" AllowCustomText="true" MarkFirstMatch="false"  EnableLoadOnDemand="true" EmptyMessage="Enter keyword(s)"  OnClientKeyPressing="RadComboKeyPress" OnClientItemsRequestFailed="OnASClientItemsRequestFailedHandler" OnItemsRequested="RadComboBoxAS_ItemsRequested" HighlightTemplatedItems="true" DataTextField="strKeyword" EnableViewstate="False" LoadingMessage = "<img src=/images/loading1.gif height=7px width=51px>" AnimationType="None" ShowToggleImage="False" EnableTextSelection="True"></telerik:RadComboBox></ItemTemplate></telerik:RadToolBarButton><telerik:RadToolBarButton id="SearchSubmitTemplate" text="SEARCH" Group="Search" AllowSelfUncheck="true" value="MainSearch" ImageURL="http://css.zymmetrical.com/search-stock-photos.png" ImagePosition = "1" checked="True" cssclass="CustomItem"></telerik:RadToolBarButton><telerik:RadToolBarButton IsSeparator="true"></telerik:RadToolBarButton><telerik:RadToolBarButton id="BCTemplate"><itemtemplate>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<dnn:SCBreadcrumb runat="server" CSSClass="copyright" id="dnnBreadcrumb" Separator="&nbsp;&raquo;&nbsp;" RootLevel="0" LastAsSpan="False" /></itemtemplate></telerik:radtoolbarbutton></items></telerik:RadToolBar> 

button fire event:
Public Sub RadToolBarSearch_ButtonClick(ByVal sender As Object, ByVal e As RadToolBarEventArgs) 
If  e.Item.Value = "MainSearch" THEN 
Dim keywords As String 
If len(keywords)< 1 THEN 
    Response.Write("<script>alert('Please type some keywords in the box and then click Search button');</script>")   
    Else         
Response.Redirect (lcase("/search-results/keyword/" + keywords + "/")) 
End if 
End Sub   

Zyguy
Top achievements
Rank 1
 answered on 18 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?