Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
40 views
Hi,
In the editor when you click insert hyperlink, you are offered the document manager to select links from. My end users want the ability to select images as well (they do not understand html well enough to add this manually). Is there a way to acomplish this?

Thanks
Dobromir
Telerik team
 answered on 05 Oct 2010
1 answer
145 views
Hi all!

I cannot make FileExplorer to show files and folders in the root folder. Everything is OK for child folders.

I have custom FileBrowserContentProvider:
     
public override DirectoryItem ResolveRootDirectoryAsTree(string path)
{
  Assert.ArgumentNotNull(path, "path");
      if (path.Length == 0)
     {
        path = "/media library/";
     }
   Item item = GetItem(path);
     if (item == null)
     {
    return null;
  }
   PathPermissions permissions = GetPermissions(item);
   DirectoryItem result = new DirectoryItem(item.DisplayName, GetParentPath(item), string.Empty, string.Empty, permissions, GetChildFiles(item), GetChildDirectories(item));
   return result;
}
static DirectoryItem[] GetChildDirectories(Item item)
  {
  Assert.ArgumentNotNull(item, "item");
   List<DirectoryItem> result = new List<DirectoryItem>();
      foreach (Item child in item.Children)
     {
        if (child.TemplateID != TemplateIDs.MediaFolder)
        {
      continue;
    }
 
    PathPermissions permissions = GetPermissions(child);
     DirectoryItem directoryItem = new DirectoryItem(child.Name, string.Empty, child.Paths.Path, string.Empty, permissions, null, null);
     result.Add(directoryItem);
  }
   return result.ToArray();
}
public override DirectoryItem ResolveDirectory(string path)
{
  Assert.ArgumentNotNull(path, "path");
  Item item = GetItem(path);
  if (item == null)
  {
    return null;
  }
  PathPermissions permissions = GetPermissions(item);
  return new DirectoryItem(item.DisplayName, string.Empty, item.Paths.Path, string.Empty, permissions, GetChildFiles(item), null);
}

static FileItem[] GetChildFiles(Item item)
{
  Assert.ArgumentNotNull(item, "item");
   List<FileItem> result = new List<FileItem>();
   foreach (Item child in item.Children)
  {
    if (child.TemplateID == TemplateIDs.MediaFolder)
    {
      continue;
    }
     PathPermissions permissions = GetPermissions(child);
     MediaItem mediaItem = child;
     MediaUrlOptions options = new MediaUrlOptions();
     options.UseItemPath = false;
     string url = MediaManager.GetMediaUrl(child, options);
     FileItem directoryItem = new FileItem(child.Name + "." + mediaItem.Extension, mediaItem.Extension, mediaItem.Size, string.Empty, url, string.Empty, permissions);
     result.Add(directoryItem);
  }
   return result.ToArray();
}
Any help will be appreciated.
Fiko
Telerik team
 answered on 05 Oct 2010
1 answer
208 views
Hi,

I just discovered that RadComboBox sends the Text and not the Value to the RequiredFieldValidator.  This means I had to write a custom validator for RadComboBox.  This is fine for server-side but for the ClientValidationFunction I have a problem.  I have it working, but the ClientValidationFunction is also called when the RadComboBox OnClientSelectedIndexChanging event is fired.  This causes it to be validated before the selected index is set and so produce an incorrect validation result.

How can I prevent the OnClientSelectedIndexChanging event from causing the ClientValidationFunction to fire?

Thanks.
Princy
Top achievements
Rank 2
 answered on 05 Oct 2010
1 answer
108 views
Hello,

I'm working on a toolbar with a custom dropdown. I want to place a treeview instead of a list of items for selection. I'm able to fill and to use the treeview but I have two problems :
 
1/ How to disable standard animation behind my treeview (selected colors appears behind like if toolbarbuttons where there) ?

2/ How to post a postback event "RadToolBar.ButtonClick" each time I change my selection ?

Best regards

PS : my code

<script type="text/jscript" >
    function OnClientNodeClickingHandler(sender, e) {
        var r = $find("<%= rtoolbar.ClientID %>")
        var c = r.get_items().getItem(1);
        r.trackChanges();
        c.set_text(e.get_node().get_text());
        r.commitChanges();
    }
</script>
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="rtoolbar">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rsPlanning" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadToolBar runat="server" Width="100%" ID="rtoolbar">
    <Items>
        <telerik:RadToolBarButton>
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text="Label">Groupe de moyens :</asp:Label>
            </ItemTemplate>
        </telerik:RadToolBarButton>
        <telerik:RadToolBarDropDown ID="rSelectProdLineGroup" runat="server" Text="Sélectionnez un groupe..." 
            DropDownWidth="250px" >
            <Buttons>
                <telerik:RadToolBarButton runat="server" >
                    <ItemTemplate>
                        <telerik:RadTreeView ID="rtvInProdLineGroups" Runat="server" Width="100%" Height="100%" OnClientNodeClicking="OnClientNodeClickingHandler">
                        </telerik:RadTreeView>
                    </ItemTemplate>
                </telerik:RadToolBarButton>
            </Buttons>
        </telerik:RadToolBarDropDown>
Yana
Telerik team
 answered on 05 Oct 2010
1 answer
43 views
Hi,
Is there any way to open the RadEditor in Popup in moss 2007.

I am using RadEditor's Licence version but not getting any property in configFile.xml.

This is the client's requirement to show the RadEditor in popup window. So early response is appreciated.


Thanks
Rajesh Soni
Stanimir
Telerik team
 answered on 05 Oct 2010
1 answer
90 views
I have an application that has multi-line text box.  When I press the Insert button, it opens a RadWindow with the Rad Editor.  I want save the database and send the text back to the page with the text box.

Main Page
  
<head runat="server">
    <title>Testing</title>
   <link href="StyleSheet1.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript">
       
     function OnClientClose(radWindow1, args) {
         var arg = args.get_argument();
         var text = document.getElementById('txtConclusion');
         text.value = arg.result;
           
     }
     function openWin() {
         var oWnd = radopen("insertcomments.aspx", "RadWindow2");
     }
  
     </script>
  
  
  
  
</head>
<body>
    <form id="form1" runat="server">
    <div>
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
        <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="Webform3.aspx" 
            ReloadOnShow="True" Top="60px" onclientclose="OnClientClose">
                </telerik:RadWindow>
                <telerik:RadWindow ID="RadWindow2" runat="server" NavigateUrl="insertcomments.aspx" 
             ReloadOnShow="True" Top="60px" onclientclose="OnClientClose" Width="660" Height="500px">
                </telerik:RadWindow>
        </Windows>
        </telerik:RadWindowManager>
        <table >
            <tr valign="top">
                <td>
                    <table >
                    <thead>
                        <tr>
                            <th scope="col">Conclusion</th>
                        </tr>
                        </thead>
                        <tr>
                            <td>    
                                <asp:TextBox ID="txtConclusion" runat="server" Height="249px" 
    style="margin-bottom: 72px" TextMode="MultiLine" Width="138px" ReadOnly="True"></asp:TextBox>
                       <br /> 
                              <button onclick="openWin(); return false;">Insert</button>
  
                                          </td>
                        </tr>
                          
                    </table></td>
                <td>
                   <table class="section">
                    <thead>
                        <tr>
                            <th scope="col">Current News</th>
                        </tr>
                        </thead>
                        <tr>
                            <td><asp:TextBox ID="txtCurrentNews" runat="server" Height="160px" 
    style="margin-bottom: 72px" TextMode="MultiLine" Width="138px"></asp:TextBox>
                            </td>
                        </tr>
                    </table></td>
            </tr>
            <tr>
                <td>
                     </td>
                <td>
                     </td>
            </tr>
        </table>
    </div>
      
  
  
  
    </form>
</body>
</html>
  
Popup Page
Pop Page
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
   <title>Investment Web Site</title>
   <link href="StyleSheet1.css" rel="stylesheet" type="text/css" />
     
   <script type="text/javascript">
         function GetRadWindow() {
             var oWindow = null;
             if (window.radWindow)
              oWindow = window.radWindow;
          else if (window.frameElement.radWindow)
              oWindow = window.frameElement.radWindow;
             return oWindow;
         }
       function CloseWindow() {
             var currentWindow = GetRadWindow();
             var oarg = new Object();
             oarg.result = document.getElementById("RadEditor1").content;
              //var result = document.getElementById("RadioButtonList1_0").checked;
             //currentWindow.argument = arg;
             currentWindow.Close(oarg);
         }
          
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>
          
        <br />
            <table style="width: 680px" cellspacing="3" cellpadding="5">
               <tr>
                   <td style="width: 100%"><asp:Image ID="imgTitle" runat="server" />
                   <p><asp:Label ID="lblMessage" runat="server" Visible = "false" CssClass ="red" ></asp:Label></p></td>
               </tr>
               <tr>
                   <td >
                       <telerik:RadEditor ID="RadEditor1" Runat="server" ToolsFile="~/BasicTools.xml" Width="600px">
                           <Content>
                          </Content>
                       </telerik:RadEditor>
                   </td>
               </tr>
               <tr>
                   <td style="width: 100%; margin-top: 6px;" align="center"></td>
               </tr>
          </table>
      <div style="margin-left: 450px"
                                            <asp:ImageButton ID="imgAddComment" runat="server" 
                                                ImageUrl="~/images/btnAddComment.gif" />
                                                </div>
      </div>
      
    </form>
</body>
</html>
  
  
Code Behind
  
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
          
    End Sub
  
        Protected Sub imgAddComment_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles imgAddComment.Click
        Dim ReturnMsg As String = ""
  
        Try
            If RadEditor1.Content <> "" Then
                If LCase(RadEditor1.Content).EndsWith("<br />") Then
                    RadEditor1.Content = RadEditor1.Content.Substring(0, Len(RadEditor1.Content) - 6)
                End If
  
                'ReturnMsg = InvestSupProviders.InsertConclusionComment(Session("CompanyID"), "", Session("UserSession").ID_User, Now, RadEditor1.Content)
                ReturnMsg = InvestSupProviders.InsertConclusionComment(21, "", 5, Now, RadEditor1.Content)
  
                If ReturnMsg = "" Then
                    lblMessage.Text = "Message added"
                    lblMessage.Visible = True
                    'RadEditor1.Content = "  "
                Else
                    lblMessage.Text = ReturnMsg
                    lblMessage.Visible = True
                End If
            Else
                lblMessage.Text = "There is no Content"
                lblMessage.Visible = True
            End If
  
        Catch ex As Exception
            'Page_Error(ex, "Page_Load")
        End Try
    End Sub
End Class
Dobromir
Telerik team
 answered on 05 Oct 2010
3 answers
53 views
Running in SharePoint 2010.

<telerik:RadTabStrip ID="RadTabStrip2" runat="server" OnClientTabSelected="ClientTabSelectedHandler"
                SelectedIndex="1">
                <Tabs>
                    <telerik:RadTab runat="server" Text="Map" PageViewID="radPageMapView" PostBack="false" Selected="True">
                    </telerik:RadTab>
                    <telerik:RadTab runat="server" Text="List" PageViewID="radPageListView" PostBack="false">
                    </telerik:RadTab>
                </Tabs>
            </telerik:RadTabStrip>

.RadTabStripTop_Default .rtsLink
    {
        background: url(/SiteAssets/images/Navigation/Sub1/sub1_back_off.png) top right !important;
    }
    .RadTabStripTop_Default .rtsSelected
    {
        background: url(/SiteAssets/images/Navigation/Sub1/sub1_back_on.png) top right !important;
    }


Works great in IE8 and Chrome. Neither background image display in IE7.
Yana
Telerik team
 answered on 05 Oct 2010
5 answers
335 views
Hi,
After I upgraded to version 2009_2_826_dev_hotfix,
my pages started to show the error for tabstrip and other controls as well:

            BC30002: Type 'Telerik.Web.UI.RadTabStrip' is not defined.

The error will show randomly and sometimes it will load properly.
It was working fine before the upgrade. Is there something I can do?
Peter
Telerik team
 answered on 05 Oct 2010
9 answers
264 views
I have a set of RadDocks with the handle set to none and using a custom handle.  When one of these docks is dropped into an empty RadDockZone there is no dotted line shown for the Drop Zone.

I noticed this behavior on your online examples as well:
to reproduce, empty a dock zone and then drag a RadDock into the emptied zone, you will notice that no indication of the drop zone is visible.

Is there a way to force the dotted border for the drop zone to show while dragging on top of the zone?

Thank you.

Fernando Mayorga
Pero
Telerik team
 answered on 05 Oct 2010
1 answer
94 views
Hello,

The following bug occurs only in the first time ever you enter the rad editor. In order to reproduce it, you need to clear the internet temporary files in the browser and then enter the page.

The bug is simple: Create a wizard. Put the editor in the second step of a wizard and put the wizard inside UpdatePanel. When you click next to move from the first step to the second step (where the editor is), the editor width becomes huge and the tool buttons are spread all over it.
If you try do it again without clearing the temporary files cache, the editor is fine.

Any ideas to solve it will be appreciated (I'm using 2010 SP1).

The code:
<%@ Page Language="VB" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
  
<script runat="server">
</script>
  
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
  <asp:ScriptManager ID="ScriptManager1" runat="server" />
  <asp:UpdatePanel runat="server">
   <ContentTemplate>
    <asp:Wizard runat="server" ID="w" DisplaySideBar="False" DisplayCancelButton="True" >
        <WizardSteps>
            <asp:WizardStep Title="Step 1" ID="WizardStep1" runat="server">
                    step 1
            </asp:WizardStep>
            <asp:WizardStep Title="Step 2" ID="WizardStep2" runat="server">
                    step 2
                    <telerik:radeditor runat="server">
                        <Content>
                            Sample Content 
                        </Content>
                    </telerik:radeditor>
            </asp:WizardStep>
            <asp:WizardStep Title="Step 3" ID="WizardStep3" runat="server">
                    step 3
            </asp:WizardStep>
        </WizardSteps>
    </asp:Wizard>
   </ContentTemplate>
  </asp:UpdatePanel>
</form>
</body>
</html>

Rumen
Telerik team
 answered on 05 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?