Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
53 views
Hi ,
Whenerver i bind Sheduler with more then  15 appointment in Once column/Row  then my sheduler display gets very slow and i am not able to use vertical/Horizontal scroll baar also.
Can any one help me ASAP.
Plamen
Telerik team
 answered on 13 Feb 2012
7 answers
212 views
I want to see radwindow close button ID but alert is return "null". How can i get close button ID Thanks.

My codes here:


 
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }



$(document).ready(function() {

            var Wnd = GetRadWindow();
            alert(Wnd) ; // it is return me "RadWindow id=RDW"
            alert(Wnd.Id); // it is return me "undefined"
            var CloseButton = document.getElementById("CloseButton" +Wnd.Id);

            alert(CloseButton); // it is return me "null"
            CloseButton.onclick = function() {

            }


        });
Svetlina Anati
Telerik team
 answered on 13 Feb 2012
5 answers
669 views
Hi.  I keep getting the following javascript error when I try to open a radwindow: "Uncaught TypeError: Cannot call method 'open' of undefined ".  The document is in a folder, and I am trying to get to it with this url...

Here is my code:
<telerik:RadCodeBlock ID="rcb1" runat="server">
    <script type="text/javascript">
 
        function openDoc() {
            var myBox = $find("<%= RadTextBox1.ClientID %>");
            var myURL = myBox.get_value()
 
            window.radopen("Folder1\/" + myURL + ".pdf", "ViewDoc");
            return false;
        }
 
 
    </script>
</telerik:RadCodeBlock>
           
and my radWindow:
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" Skin="WebBlue">
        <Windows>
            <telerik:RadWindow ID="ViewDoc" runat="server" Title="Add or Edit"
            Width="410px" Height="475px" ReloadOnShow="true" ShowContentDuringLoad="false"
            Modal="true" />
        </Windows>
</telerik:RadWindowManager>


Any help is greatly appreciated.
GP
Top achievements
Rank 1
 answered on 13 Feb 2012
1 answer
209 views
Hi Telrik Support
I used latest version telerik asp.net control .How can I set Width in Percentage(%) in RadTabStrip .
Thanks and regards
Sanjay Singh
Casey
Top achievements
Rank 1
 answered on 13 Feb 2012
1 answer
76 views
Hi,

I'm wondering how to change the various appearance properties of the child nodes of an autogenerated hierarchical menu (I'd like to be able to left-justify the tiems, provide a scroll height etc)

Cheers
Princy
Top achievements
Rank 2
 answered on 13 Feb 2012
7 answers
349 views
Hi,

I am using the latest version fo the telerik control. I have the tooltip control displayed for each cell in the RadGrid. It automatically repositions on the boundary detection but relative to the wrong element / grid cell. Here is the code. I want it to position either topleft or bottomleft based on the position of the grid cell on boundary detection. Currently, If the tooltip is not closer to the boundary then it looks ok. But when it is closer to the boundary then it moves down the tooltip pointing to the wrong element to display the whole tooltip. What am I missing in the code? Thanks in advance!

<telerik:RadToolTipManager runat="server" ID="vsRadToolTipManager" VisibleOnPageLoad="false"
                EnableViewState="false" AutoTooltipify="false"
                ShowEvent="FromCode"  EnableAjaxSkinRendering="true"  Modal="true"
                HideEvent="ManualClose"
                RelativeTo="Element"        
                Width="180px" Height="255px"                      
                Skin="Hay" OffsetY="-6" OffsetX="-55"
                OnAjaxUpdate="OnAjaxUpdate" OnClientHide="OnVsTooltipHide"
                OnClientBeforeShow="OnRadTooltipBeforeShow" OnClientShow="CancelAJAX"
                >
                <TargetControls>
                    <telerik:ToolTipTargetControl TargetControlID="fieldForTooltip" IsClientID="false" />
                </TargetControls>
            </telerik:RadToolTipManager>            
Marin Bratanov
Telerik team
 answered on 13 Feb 2012
7 answers
207 views
Hi,
I'm creating a custom skin for RadRating which will make the stars smaller (originally they are 18px, I'm making them 14px). Everything works when the value is an even number. When it is set to half a star, the span is given a 9px width inline style (I need it to be 7px) but no class for identifying which list item is a half star vs a star is given, so I can't override the inline style. Is there any way to identify which list items are half stars or a way I can change the 9px span width to 7px?
Thanks,
Mike
Slav
Telerik team
 answered on 13 Feb 2012
4 answers
175 views

I am attempting to use the provided custom connector for physical and shared folder's paths. However, when I attempt to load the default page I recieve the following error:

Line 310:    Public Overrides Function CheckReadPermissions(ByVal folderPath As String) As Boolean

I modified my directories like so:

Default.APSX.VB

Partial Public Class _Default
    Inherits System.Web.UI.Page
  
    Protected Sub Page_Load(sender As Object, e As EventArgs)
        Dim viewPaths As String() = New String() {"C:\01-Admin", "\\Telerik.com\Path\SharedDir"}
  
        Dim uploadPaths As String() = New String() {"C:\01-Admin", "\\Telerik.com\Path\SharedDir"}
  
        Dim deletePaths As String() = New String() {"C:\01-Admin", "\\Telerik.com\Path\SharedDir"}
  
        RadFileExplorer1.Configuration.ViewPaths = viewPaths
        RadFileExplorer1.Configuration.UploadPaths = uploadPaths
        RadFileExplorer1.Configuration.DeletePaths = deletePaths
RadFileExplorer1.Configuration.SearchPatterns = New () {"*.*"}
        RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomFileSystemProvider).AssemblyQualifiedName
    End Sub
    
End Class


MappingFile.mapping

<?xml version="1.0" encoding="utf-8" ?>
<CustomFileBrowserProvider>
  <Paths>
    <genericHandlerPath>FileSystemHandler.ashx</genericHandlerPath>
  </Paths>
  <Mappings>
    <Mapping>
      <PhysicalPath>
        <![CDATA[C:\01-Admin]]>
      </PhysicalPath>
      <VirtualPath><![CDATA[MyCusomRootDir 1/]]></VirtualPath>
    </Mapping>
    <Mapping>
      <PhysicalPath>
        <![CDATA[\\Telerik.com\Path\SharedDir]]>
      </PhysicalPath>
      <VirtualPath><![CDATA[MySharedRootDir/]]></VirtualPath>
    </Mapping>
  
  </Mappings>
</CustomFileBrowserProvider>

Any help much apprciated.



Dobromir
Telerik team
 answered on 13 Feb 2012
2 answers
181 views
I added a date column to the file explorer and it was working.  I has recently stopped working and I cannot find any reason.  I am getting the following error 

Could not find a part of the path 'D:\www\FreeCE_Net\www\Files\Instructors\~\Files\Instructors\'.



The error is catching on Dim oldItem As DirectoryItem = MyBase.ResolveDirectory(path) in my Public OverLoads Overrides Function ResolveDirectoryPath.  

I have double checked the path it does exist.

.aspx code:

<script type="text/javascript">
        //<![CDATA[


    function OnClientFileOpen(oExplorer, args) {
        var item = args.get_item();
        var fileExtension = item.get_extension();




        if (1 == 1) {// Download the file 
            // File is a image document, do not open a new window


            args.set_cancel(true);


            // Tell browser to open file directly
            var requestImage = "Handler.ashx?path=" + item.get_url();
            document.location = requestImage;
        }
    }
        //]]>
    </script>


    <div style="float: left">
        <telerik:RadFileExplorer runat="server" ID="RadFileExplorer1" Width="734px" Height="400px"
             onclientfileopen="OnClientFileOpen" EnableOpenFile="true" OnExplorerPopulated="RadFileExplorer1_ExplorerPopulated">
            <Configuration ViewPaths="~/Files/Instructors/" DeletePaths="~/Files/Instructors/" SearchPatterns="~/Files/Instructors/"
                UploadPaths="~/Files/Instructors/" />
        </telerik:RadFileExplorer>
    </div>


aspx.vb code:


Imports System
Imports System.Collections
Imports System.Data
Imports System.Configuration
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.IO
Imports System.Web
Imports System.Collections.Generic
Imports Telerik.Web.UI.Widgets
Imports Telerik.Web.UI






Partial Class Admin_InstructorFileManager2
    Inherits FreeCE.Web.UI.Page
    Protected Sub Page_Load(sender As Object, e As EventArgs)
        If Not IsPostBack Then
            'be sure to set content provider first before doing anything involving paths (e.g. set InitialPath)
            RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomColumnsContentProvider).AssemblyQualifiedName
            RadFileExplorer1.InitialPath = Page.ResolveUrl("~/Files/Instructors/")




        End If
        'AddDateAndOwnerColumns()
    End Sub




    Protected Sub RadFileExplorer1_Load(sender As Object, e As System.EventArgs) Handles RadFileExplorer1.Load
        RadFileExplorer1.Configuration.ContentProviderTypeName = GetType(CustomColumnsContentProvider).AssemblyQualifiedName
        RadFileExplorer1.InitialPath = Page.ResolveUrl("~/Files/Instructors/")
        Dim gridTemplateColumn1 As New GridTemplateColumn()
        gridTemplateColumn1.HeaderText = "Creation Date"
        gridTemplateColumn1.SortExpression = "Date"
        gridTemplateColumn1.UniqueName = "Date"
        gridTemplateColumn1.DataField = "Date"
        ' Add the first column
        RadFileExplorer1.Grid.Columns.Add(gridTemplateColumn1)
    End Sub


    Private Sub AddGridColumn(name As String, uniqueName As String, sortable As Boolean)
        'remove first if grid has a column with that name
        RemoveGridColumn(uniqueName)
        ' Add a new column with the specified name
        Dim gridTemplateColumn1 As New GridTemplateColumn()
        gridTemplateColumn1.HeaderText = name
        If sortable Then
            gridTemplateColumn1.SortExpression = uniqueName
        End If
        gridTemplateColumn1.UniqueName = uniqueName
        gridTemplateColumn1.DataField = uniqueName


        RadFileExplorer1.Grid.Columns.Add(gridTemplateColumn1)
    End Sub


    Private Sub RemoveGridColumn(uniqueName As String)
        If Not [Object].Equals(RadFileExplorer1.Grid.Columns.FindByUniqueNameSafe(uniqueName), Nothing) Then
            RadFileExplorer1.Grid.Columns.Remove(RadFileExplorer1.Grid.Columns.FindByUniqueNameSafe(uniqueName))
        End If
    End Sub


    Private Sub AddDateAndOwnerColumns()




        AddGridColumn("Creation Date", "Date", True)




    End Sub


    Protected Sub RadFileExplorer1_ExplorerPopulated(sender As Object, e As RadFileExplorerPopulatedEventArgs)
        'implement sorting for the custom Date column
        Dim sortingColumn As String = e.SortColumnName
        If sortingColumn = "Date" Then
            Dim dc As New DateComparer()
            e.List.Sort(dc)
            If e.SortDirection.IndexOf("DESC") <> -1 Then
                'reverse order
                e.List.Reverse()
            End If
        End If
    End Sub


    Public Class DateComparer
        Implements IComparer(Of FileBrowserItem)
        Function Compare(item1 As FileBrowserItem, item2 As FileBrowserItem) As Integer Implements IComparer(Of FileBrowserItem).Compare
            'treat folders separate from files
            Dim date1 As DateTime = DateTime.Parse(item1.Attributes("Date"))
            Dim date2 As DateTime = DateTime.Parse(item2.Attributes("Date"))
            If TypeOf item1 Is DirectoryItem Then
                If TypeOf item2 Is DirectoryItem Then
                    Return DateTime.Compare(date1, date2)
                Else
                    Return -1
                End If
            Else
                If TypeOf item2 Is DirectoryItem Then
                    Return 1
                Else
                    Return DateTime.Compare(date1, date2)
                End If
            End If
        End Function
    End Class


    Public Class CustomColumnsContentProvider
        Inherits FileSystemContentProvider
        Public Sub New(context As HttpContext, searchPatterns As String(), viewPaths As String(), uploadPaths As String(), deletePaths As String(), selectedUrl As String, _
            selectedItemTag As String)
            ' Declaring a constructor is required when creating a custom content provider class
            MyBase.New(context, searchPatterns, viewPaths, uploadPaths, deletePaths, selectedUrl, _
                selectedItemTag)
        End Sub




        Public Overloads Overrides Function ResolveDirectory(path As String) As DirectoryItem
            ' Update all file items with the additional information (date, owner)
            Dim oldItem As DirectoryItem = MyBase.ResolveDirectory(path)


            For Each fileItem As FileItem In oldItem.Files
                ' Get the information from the physical file
                Dim fInfo As New FileInfo(Context.Server.MapPath(VirtualPathUtility.AppendTrailingSlash(oldItem.Path) + fileItem.Name))


                ' Add the information to the attributes collection of the item. It will be automatically picked up by the FileExplorer
                ' If the name attribute matches the unique name of a grid column


                fileItem.Attributes.Add("Date", fInfo.CreationTime.ToString())


                ' Type targetType = typeof(System.Security.Principal.NTAccount);
                ' string value = fInfo.GetAccessControl().GetOwner(targetType).Value.Replace("\\", "\\\\");
                'Dim ownerName As String = "PharmCon"
                'fileItem.Attributes.Add("Owner", ownerName)
            Next


            Return oldItem
        End Function


        Public Overloads Overrides Function ResolveRootDirectoryAsTree(path As String) As DirectoryItem
            ' Update all directory items with the additional information (date, owner)
            Dim oldItem As DirectoryItem = MyBase.ResolveRootDirectoryAsTree(path)


            For Each dirItem As DirectoryItem In oldItem.Directories
                ' Get the information from the physical directory
                Dim dInfo As New DirectoryInfo(Context.Server.MapPath(VirtualPathUtility.AppendTrailingSlash(dirItem.Path)))


                ' Add the information to the attributes collection of the item. It will be automatically picked up by the FileExplorer
                ' If the name attribute matches the unique name of a grid column


                dirItem.Attributes.Add("Date", dInfo.LastWriteTime.ToString())


                'Type targetType = typeof(System.Security.Principal.NTAccount);
                'string value = dInfo.GetAccessControl().GetOwner(targetType).Value.Replace("\\", "\\\\");
                'Dim ownerName As String = "PharmCon"
                ' dirItem.Attributes.Add("Owner", ownerName)
            Next
            Return oldItem
        End Function
    End Class




End Class




Jarrett
Top achievements
Rank 2
 answered on 13 Feb 2012
7 answers
428 views
Hello,

I have an ASP.NET Ajax Web Application in .NET 2.0. Every pages are wrapped inside an update panel. In one of the pages, I have a RadWindow. The page displayed in the RadWindow is wrapped inside an updatepanel. There are various ajax controls set in there (not rad but the regular ajax controls like TextBoxWaterMark, ModalPopup, Calendar, etc). They all work fine without any problem.

When I put this application in SharePoint, the ajax controls in the RadWindow do not work. RadWindow is popped up with all controls and stylesheet intact. The update panel works, everything is asynchronous. But ajax doesn't work. The calendar doesn't show up, text supposed to be textbox watermark thinks as if it is a regular typed in text, and modal popup doesn't show up.

Is this a bug or am I doing something wrong?
asilioni
Top achievements
Rank 1
 answered on 13 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?