I want 2 functions, authorize permission and deny permission using a checkbox, which means now I'm in my administrator webpage. I can authorize/deny permission to view the treeview nodes to different roles
Currently I have 3 roles, Administrator, User and Guest.
I would like the user to only see Master Files and Security tree nodes , how would i able to do it ?
bennylwl
0 Points
3 Posts
TreeView programming
Jan 28, 2013 12:45 AM|LINK
Hi All,
so I got this treeview now
<asp:TreeView ID="TreeView2" runat="server" ImageSet="WindowsHelp" Width="16px">
<ParentNodeStyle Font-Bold="False" />
<HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
<SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False"
HorizontalPadding="0px" VerticalPadding="0px" />
<Nodes>
<asp:TreeNode Text="Master Files" Value="New Node">
<asp:TreeNode Text="Additives Master" Value="New Node"></asp:TreeNode>
<asp:TreeNode Text="Additive Composition Master" Value="New Node">
</asp:TreeNode>
<asp:TreeNode Text="Products Master" Value="New Node"></asp:TreeNode>
<asp:TreeNode Text="Tanks Master" Value="New Node"></asp:TreeNode>
<asp:TreeNode Text="Trucks Master" Value="Trucks Master"></asp:TreeNode>
<asp:TreeNode Text="Track Code Master" Value="Track Code Master"></asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Security" Value="Security">
<asp:TreeNode Text="TAS User Management" Value="TAS User Management">
</asp:TreeNode>
<asp:TreeNode Text="Change Own Password" Value="Change Own Password">
</asp:TreeNode>
</asp:TreeNode>
<asp:TreeNode Text="Alarms" Value="Alarms"></asp:TreeNode>
<asp:TreeNode Text="Seals" Value="Seals"></asp:TreeNode>
<asp:TreeNode Text="Loading Management" Value="Loading Management">
</asp:TreeNode>
<asp:TreeNode Text="Order Management" Value="Order Management"></asp:TreeNode>
<asp:TreeNode Text="Opening/Closing" Value="Opening/Closing"></asp:TreeNode>
<asp:TreeNode Text="Weight Bridge" Value="Weight Bridge"></asp:TreeNode>
<asp:TreeNode Text="AuditTrails" Value="AuditTrails"></asp:TreeNode>
</Nodes>
<NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black"
HorizontalPadding="5px" NodeSpacing="0px" VerticalPadding="1px" />
</asp:TreeView>
I want 2 functions, authorize permission and deny permission using a checkbox, which means now I'm in my administrator webpage. I can authorize/deny permission to view the treeview nodes to different roles
Currently I have 3 roles, Administrator, User and Guest.
I would like the user to only see Master Files and Security tree nodes , how would i able to do it ?
Perkinsville
Member
588 Points
79 Posts
Re: TreeView programming
Feb 08, 2013 01:45 PM|LINK
Hi,
I wrote this article and a few others on the site about Tree Views. I include some downloadable source too.
http://www.thebestcsharpprogrammerintheworld.com/blogs/treeview-with-checkbox-in-wpf-using-csharp.aspx
It is based on WPF, but the C# can be likely be reused.
HTH, Benjamin