Hi I have been able to hide hidden files but i cant seem to get the directories to hide my files code is -
public override DirectoryItem ResolveDirectory(string virtualPath)
{
DirectoryItem basedir = base.ResolveDirectory(virtualPath);
string physicalPath;
physicalPath = this.GetPhysicalFromVirtualPath(virtualPath);
if (physicalPath == null)
return null;
DirectoryItem result = new DirectoryItem(PathHelper.GetDirectoryName(physicalPath),
virtualPath,
virtualPath,
virtualPath,
GetPermissions(physicalPath),
GetFiles(virtualPath),
new DirectoryItem[] { }// Directories are added in ResolveRootDirectoryAsTree method
);
// Update all file items with the additional information (date, owner)
DirectoryItem oldItem = base.ResolveDirectory(physicalPath);
List<FileItem> visibleFiles = new List<FileItem>();
foreach (FileItem fileItem in result.Files)
{
// Get the information from the physical file
FileInfo fInfo = new FileInfo(physicalPath + "\\" + 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("CreationDate", fInfo.CreationTimeUtc.ToString());
fileItem.Attributes.Add("ModifiedDate", fInfo.LastWriteTime.ToString());
FileAttributes fileattr = File.GetAttributes(physicalPath + "\\" + fileItem.Name);
if((fileattr & FileAttributes.Hidden) != FileAttributes.Hidden)
{
visibleFiles.Add(fileItem);
}
}
DirectoryItem result1 = new DirectoryItem(PathHelper.GetDirectoryName(physicalPath),
virtualPath,
virtualPath,
virtualPath,
GetPermissions(physicalPath),
visibleFiles.ToArray(),
new DirectoryItem[] { }// Directories are added in ResolveRootDirectoryAsTree method
);
return result1;
}
Which works really well my Directory code is code is - >
public override DirectoryItem ResolveRootDirectoryAsTree(string path)
{
string physicalPath;
string virtualPath = string.Empty;
if (PathHelper.IsSharedPath(path) || PathHelper.IsPhysicalPath(path))
{
physicalPath = path;
foreach (KeyValuePair<string, string> mappedPath in MappedPaths)
{
if (physicalPath.StartsWith(mappedPath.Value, StringComparison.CurrentCultureIgnoreCase))
{
string restOfPhysicalPath = physicalPath.Substring(mappedPath.Value.Length);
virtualPath = mappedPath.Key + restOfPhysicalPath.Replace('\\', '/');
virtualPath = PathHelper.AddEndingSlash(virtualPath, '/');
break;
}
}
}
else
{
virtualPath = PathHelper.AddEndingSlash(path, '/');
physicalPath = this.GetPhysicalFromVirtualPath(path);
if (physicalPath == null)
return null;
}
DirectoryItem result = new DirectoryItem(PathHelper.GetDirectoryName(physicalPath),
string.Empty,
virtualPath,
string.Empty,
GetPermissions(physicalPath),
new FileItem[] { }, // Files are added in the ResolveDirectory method
GetDirectories(virtualPath)
);
return result;
}
Any help would be much appreciated.
Hello,
Currently I have the 'UI for ASP.NET AJAX Q3 2014' library.
I ask if it is possible to place the 'RadEditorNodeInspector' module on the top of the editor, after the Tools buttons.
I have already seen that there is a secondary way to do that by coding <telerik:EditorModule Name="RadEditorNodeInspector" Enabled="true" dockingzone="Top" /> but this is not a good way because there are some grafical issues.
Is there another way to do that?
Thanks.
Regards.
Hi there, I'm using some code like this to import from Word.
Using fileStream As New FileStream(Server.MapPath(FilePath), FileMode.Open, FileAccess.Read)
EditorContent.LoadDocxContent(fileStream)
End Using
In principle this works fine. However, if text has been formatted as Heading 3 in Word, then it comes through as <p>My text</p> instead of <h3>My text</h3>.
However, if I copy/paste from Word into the editor, then the <h3> tags are preserved. Any ideas why the import is not preserving the <h3> tags?
Hi,
Sorry for this second thread about my problem (How to acces other controls inside Advanced Insert Form ??) here :
http://www.telerik.com/forums/how-to-acces-other-controls-inside-advanced-insert-form
but i realy need your help because this slow my progressin in my development for now...
If anybody has already had this problem...
Thank you
Private Sub RadGrid2_ItemCommand(ByVal source As Object, ByVal e As Telerik.WebControls.GridCommandEventArgs) Handles RadGrid2.ItemCommand
If e.CommandName = "TimeInOutTextboxes" Then
Dim editedItem As GridEditableItem = CType(e.Item, GridEditableItem)
Dim txtTimeIn As TextBox = DirectCast(editedItem.FindControl("txtTimeIn"), TextBox)
txtTimeIn.Enabled =
False
End If
but an error is thrown at "txtTimeIn.Enabled = False" because the control is not being found
Thanks
Hello All,
I came across this strange issue happening only on production.
In my RadGrid, i have set the pager style as below, and its counting and displaying the paging details properly on local, dev and test environemnts (for example, 1,000 items in 10 pages)
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
PageSizeLabelText
=
"Page Size:"
PageSizes
=
"10,20,50"
Position
=
"TopAndBottom"
PagerTextFormat
=
"{4} {5:0,0} items in {1:0,0} pages"
/>
But on production, the counting of items and pages is behaving strange. For example, when i filter and sort or page to first or last page, the counting changes randomly and displays different numbers.
Can someone help me what must the issue?
I am binding the RadGrid with "asp:ObjectDataSource" (not using NeedDataSource event). I need to do this way, as this is an old code and cannot restructure everything for good reasons.
Please suggest.
We have an application that relies heavily on Telerik controls and noticed with the most recent update (ASP.NET AJAX R3 2016) we have some rendering issues in Chrome. (See attached pictures). Firefox, IE, etc. are all fine. You can see that there is a significant amount of padding between the two checkboxes.
This is only happening on our development environment and not our live environment. Is there something with this new update that would cause rendering issues in Chrome?