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

I'm using radalert. What is the max length of the string that I can pass? It seems that it is a number between 300 to 500. If I want to display a long string whose len is 1000, what should I do?

Thanks
Bruce
Fiko
Telerik team
 answered on 02 Nov 2010
3 answers
136 views
Dear Telerik

I have a serious problem related to insert/update new/exist image into Radgrid(RadBinaryImage) column

simply it is working very well unless it has AJAX 
everything can insert/update except the Radgrid(RadBinaryImage) column

kindly please advice 


Radoslav
Telerik team
 answered on 02 Nov 2010
1 answer
203 views
Hey everyone,

I have a radNumericTextBox inside grid's insert form,I have added a onBlur function to fill a label on lose focus on text box.Now,i want to change this event to onTextChange.Which event should i change.I tried OnValueChanged,but it does'nt work also its specified that this event is fired just after the textbox loses focus.I want the value of label to change when textbox is in focus and when user changes text.How is this possible?..

* Also,what property should i use to clear the past entries from textboxes like radmaskedtextbox,radNumericTextBox?..
* 1 more thing,in my numeric text box,when a -ive entry is written it selects the minimum value.How can i avoid -IVE KEYPRESS?...
*  Also,i've a radmasked textbox that i've masked for 10 numeric digits "##########" like this its working fine,except for that it does'nt        take  space which is good but user can give spaces by pressing left or right keys,how to disable that?....

Thanks
Amit
Radoslav
Telerik team
 answered on 02 Nov 2010
4 answers
341 views

Hi, we have a scenario as follows:

We are using impersonation to send the windows credentials of the logged in user (NOT ASP user) to the file system.

The token is checked and the appropriate folders are displayed for that user.

The root folder is set to allow all users to view the contents of THIS FOLDER ONLY. Permissions are then set via NTFS per folder under the root folder.

SO EVERYONE CAN SEE THE LIST OF FOLDER UNDER THE ROOT FOLDER.

If we have 3 folders under the root folder, I want to list these 3 folders for the user. If they then try to navigate to one of the sub folders, the user’s NTFS permissions are  used to determine if they can enter the folder, and if so, if they can read/write, etc in that folder.

 

This all works with the radfileexplorer EXCEPT that if a user does not have read or write permissions to one of the sub folders the control first triggers a windows challenge response, then you get an access to path “x” is denied error.

This behaviour is fine, as long as I can TRAP and handle this. I assume I need to override either the  
FileSystemContentProvider.ResolveRootDirectoryAsTree function or
DirectoryLister.GetDirectory function.

 

I assume the problem is that the file explorer control is reading the root folder, then trying to read the contents of the sub folders in the root. As the user does not have any permissions to this folder, this causes the problem.

The only change I want to make is that it either doesn’t attempt to read sub folders when creating the root (I assume this is done in resolverootdirectoryastree).

If the user then tried to access a folder that they do not have access to, I would like to be able to handle this as well.

I have a much simpler page which has this functionality. When I list the files and fodlers in a direcotyr I simply encapsulate it in a try and catch – this allows me to handle the access is denied error:

 

Try

            Dim arrFiles As New ArrayList

            arrFiles.AddRange(myDir.GetFiles)

 

            Dim arrFolders As New ArrayList

            arrFolders.AddRange(myDir.GetDirectories)

        Catch ex As Exception

            Literal1.Text = ("<script language=""javascript"">alert('Error reading path: " & myDir.FullName.Replace(lblRootPath.Text, "[Root Folder]\").Replace("\", "\\") & "\n\n" & ex.Message.Replace(lblRootPath.Text, "[Root Folder]\").Replace("\", "\\").Replace("'", "\'") & "');</script>")

 

        End Try

 

The trace for the error is below:

UnauthorizedAccessException: Access to the path 'C:\denzien_docs\james cannot get in here' is denied.]

   System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2001955

   System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption) +1817

   System.IO.DirectoryInfo.GetDirectories(String searchPattern, SearchOption searchOption) +57

   System.IO.DirectoryInfo.GetDirectories() +11

   Telerik.Web.UI.Widgets.DirectoryLister.GetDirectories(DirectoryInfo directory, String parentPath) +24

   Telerik.Web.UI.Widgets.DirectoryLister.GetDirectory(DirectoryInfo dir, String virtualName, String location, String fullPath, String tag) +150

   Telerik.Web.UI.Widgets.FileSystemContentProvider.ResolveRootDirectoryAsTree(String path) +210

   Telerik.Web.UI.RadFileExplorer.HasSubFolders(String virtualPath) +73

   Telerik.Web.UI.RadFileExplorer.PopulateTreeNode(RadTreeNode currNode) +315

   Telerik.Web.UI.RadFileExplorer.BindExplorer() +627

   Telerik.Web.UI.RadFileExplorer.OnLoad(EventArgs e) +166

   System.Web.UI.Control.LoadRecursive() +47

   System.Web.UI.Control.LoadRecursive() +131

   System.Web.UI.Control.LoadRecursive() +131

   System.Web.UI.Control.LoadRecursive() +131

   System.Web.UI.Control.LoadRecursive() +131

   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

 

Mike
Top achievements
Rank 1
 answered on 02 Nov 2010
4 answers
359 views
Hi,

I'm not sure if this is by design, or I'm missing a setting somewhere. However, I have a few ajax calls being made from the application front simultaneously and they are fine. However, the calls appear to be interupted whenever an ajax tooltip is activated. Are tooltips a special case?

Hope you can help,

Andy.
Andrew Buxton
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
111 views
Because the context menu on the rad editor does not support nested menus, I have added a custom item to the context menu.  When the user mouses over the custom menu item it shows and positions the new rad menu accordingly.  It seems to be working very nicely except when the user shows the new rad menu but does not select anything it does not hide.  I tried 
contextMenu.add_hide(function (sender, args) {
            var menu = $find("<%=NestedContextMenu.ClientID %>");
            menu.hide();
            alert('hiding');
        });

and it works fine.  But if I have the above code and the following code:
var editor = $find("<%=TemplateEditor.ClientID%>");
 
menu.add_itemClicked(function (sender, args) {
    var menuItemValue = args.get_item()._getData().text;
    var editor = $find("<%=TemplateEditor.ClientID%>");
    editor.setFocus();
    editor.pasteHtml('hello');
    });

the item click event never fires.  I have tried everything.  Does anyone have any suggestions?
Rumen
Telerik team
 answered on 02 Nov 2010
1 answer
91 views
PagerText is not displaying - not sure why - updated the controls to 929.20

Is this the string format for the text or has it changed?
"Navigate pages {4} Page {0} from {1}, rows {2} to {3} from {5}"

Thanks

Martin
Pavlina
Telerik team
 answered on 02 Nov 2010
7 answers
352 views
I have an issue with the RADBinaryImage control, basically I'm using .net code behind to rotate the image but on every rotate the image halfs in size, yet if I refresh the page the image comes back to the correct size...if I remove ResizeMode="Fit" property it dosen't half the image size but I need this property set.

My vb.net code:

Try
          Dim p As SmartPortalLibrary.SurveyPhoto = SmartPortalLibrary.SurveyPhoto.GetPhoto(photoId)
          Dim ms As MemoryStream = New MemoryStream(p.PhotoData)
          Dim image As Bitmap = Bitmap.FromStream(ms)
          image.RotateFlip(RotateFlipType.Rotate90FlipNone)
          ms.Close()
          ms.Dispose()
          ms = New IO.MemoryStream
          image.Save(ms, ImageFormat.Jpeg)
          ms.Seek(0, SeekOrigin.Begin)
          p.SetImage(ms.ToArray)
          p = p.Save
          RadBinaryImage1.DataValue = ms.ToArray
          ms.Close()
      Catch ex As Exception
          'lblMsg.Text = "Error Rotating Image: " & ex.Message
          'lblMsg.CssClass = "lblHeaderRed"
      End Try


RADBinaryImage:
<telerik:RadBinaryImage AutoAdjustImageControlSize="true" ResizeMode="Fit" Width="1000px" Height="600px" runat="server" ID="RadBinaryImage1" />            


Orginal Image screenshot:
1

When I have rotated the image 180degrees (as you can see it has halfed size!)
2


Craig Mellon
Top achievements
Rank 1
 answered on 02 Nov 2010
2 answers
194 views
I tried to use custom css class for RadTab, I defined two classes for normal/selected tab
.SelectedTab
{
    font-weight: bold !important;
    background-image: url('../../Images/Navi_Buttons/01_Selected.png');
    background-repeat: no-repeat;
    width: 164px;
    height: 22px;
    text-align: center;
    color: White;
}
.CustomTab
{
    font-weight: bold !important;
    background-image: url('../../Images/Navi_Buttons/02_NotSelected.png');
    background-repeat: no-repeat;
    width: 164px;
    height: 22px;
    text-align: center;
    color: White;
}

and in my aspx, I set the property for tab control
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1"
                    SelectedIndex="0" Skin="" EnableEmbeddedSkins="false">
                    <Tabs>
                        <telerik:RadTab Text="AAA" SelectedCssClass="SelectedTab" CssClass="CustomTab" >
                        </telerik:RadTab>
                        <telerik:RadTab Text="BBB" SelectedCssClass="SelectedTab" CssClass="CustomTab">
                        </telerik:RadTab>
                    </Tabs>
                </telerik:RadTabStrip>

All tabs are displayed as CustomTab, and I see in the html, the selected tab has both of SelectedTab and CustomTab
<li class="rtsLI rtsFirst"><a class="rtsLink CustomTab rtsSelected SelectedTab" href="#">

Please help to check it. Thanks
he
Top achievements
Rank 1
 answered on 02 Nov 2010
1 answer
114 views
Hello,

I have a problem to find button from RadToolBarSplitButton.   (in c#)
pls Help
Shinu
Top achievements
Rank 2
 answered on 02 Nov 2010
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?