RadFileExplorer:remove the delete and rename option for particular folder
i have one root node name :myfile
subfolder:PrivateFolder
i want remove the delete and rename option for this private folder only how to achieve this
code :
private void RemoveUploadAndDelete(RadFileExplorer fileExplorer)
{
int i;// Global variable for that function
RadToolBar toolBar = fileExplorer.ToolBar;
// Remove commands from the ToolBar control;
i = 0;
while (i < toolBar.Items.Count)
{
if (toolBar.Items[i].Value == "Delete")
{
toolBar.Items.RemoveAt(i);
continue;// Next item
}
else if (toolBar.Items[i].Value == "Rename")
{
toolBar.Items.RemoveAt(i);
continue; // Next item
}
i++;// Next item
}
RadContextMenu treeViewContextMenu = fileExplorer.TreeView.ContextMenus[0];
// Remove commands from the TreeView's ContextMenus control;
i = 0;
while (i < treeViewContextMenu.Items.Count)
{
if (treeViewContextMenu.Items[i].Value == "Delete")
{
treeViewContextMenu.Items.RemoveAt(i);
continue;// Next item
}
else if (treeViewContextMenu.Items[i].Value == "Rename")
{
treeViewContextMenu.Items.RemoveAt(i);
continue;// Next item
}
i++;// Next item
}
RadContextMenu gridContextMenu = fileExplorer.GridContextMenu;
// Remove commands from the GridContextMenu control;
i = 0;
while (i < gridContextMenu.Items.Count)
{
if (gridContextMenu.Items[i].Value == "Delete")
{
gridContextMenu.Items.RemoveAt(i);
continue;// Next item
}
else if (gridContextMenu.Items[i].Value == "Rename")
{
gridContextMenu.Items.RemoveAt(i);
continue;// Next item
}
i++;// Next item
}
}
But it remove the option all the folder.i want remove the delete and rename option private folder only
i have one root node name :myfile
subfolder:PrivateFolder
i want remove the delete and rename option for this private folder only how to achieve this
code :
private void RemoveUploadAndDelete(RadFileExplorer fileExplorer)
{
int i;// Global variable for that function
RadToolBar toolBar = fileExplorer.ToolBar;
// Remove commands from the ToolBar control;
i = 0;
while (i < toolBar.Items.Count)
{
if (toolBar.Items[i].Value == "Delete")
{
toolBar.Items.RemoveAt(i);
continue;// Next item
}
else if (toolBar.Items[i].Value == "Rename")
{
toolBar.Items.RemoveAt(i);
continue; // Next item
}
i++;// Next item
}
RadContextMenu treeViewContextMenu = fileExplorer.TreeView.ContextMenus[0];
// Remove commands from the TreeView's ContextMenus control;
i = 0;
while (i < treeViewContextMenu.Items.Count)
{
if (treeViewContextMenu.Items[i].Value == "Delete")
{
treeViewContextMenu.Items.RemoveAt(i);
continue;// Next item
}
else if (treeViewContextMenu.Items[i].Value == "Rename")
{
treeViewContextMenu.Items.RemoveAt(i);
continue;// Next item
}
i++;// Next item
}
RadContextMenu gridContextMenu = fileExplorer.GridContextMenu;
// Remove commands from the GridContextMenu control;
i = 0;
while (i < gridContextMenu.Items.Count)
{
if (gridContextMenu.Items[i].Value == "Delete")
{
gridContextMenu.Items.RemoveAt(i);
continue;// Next item
}
else if (gridContextMenu.Items[i].Value == "Rename")
{
gridContextMenu.Items.RemoveAt(i);
continue;// Next item
}
i++;// Next item
}
}
But it remove the option all the folder.i want remove the delete and rename option private folder only