Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. treeview at runtime with user rights

treeview at runtime with user rights

Scheduled Pinned Locked Moved C#
helptutorialxmlquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    stevehammond
    wrote on last edited by
    #1

    Hi there, We have a menu system built using the treeview control. All items of the menu are stored in an XML file and populate at runtime. I need to implement a new feature to this treeview control and its causing me to pull my hair out (not that I have much to pull out) I need to implement a user rights feature, where each page of the menu can be assigned to a user, if the user has that page, they see the menu structure etc. For example, if I have the following structure: Menu -Sub heading 1 --page 1 --page 2 --sub heading 2 ---page 3 ---page 4 -sub heading 3 --sub heading 4 ---page 5 User 1 has the rights to page1, page 3 and page 5 so his menu would be -sub heading 1 --page1 --sub heading 2 ---page 3 -sub heading 3 --sub heading 4 ---page 5 User 2 only has access to page3 and page 5 so their menu should be -sub heading 1 --sub heading 3 ---page 3 -sub heading 3 --sub heading 4 ---page 5 Getting the page access and finding user credentials isn’t an issue, but I’m really struggling to figure out some logic to generate the menu, keep the subheadings there if they are needed and not show anything that is blank. Has anyone done anything like this in the past? Any tips would be great, and code would be fantastic – but I’m really only looking for ideas on how to complete this. I’m sure I’m making it harder than it needs to, and I’m also sure loads of people have done this without a problem Thanks in advance

    L 1 Reply Last reply
    0
    • S stevehammond

      Hi there, We have a menu system built using the treeview control. All items of the menu are stored in an XML file and populate at runtime. I need to implement a new feature to this treeview control and its causing me to pull my hair out (not that I have much to pull out) I need to implement a user rights feature, where each page of the menu can be assigned to a user, if the user has that page, they see the menu structure etc. For example, if I have the following structure: Menu -Sub heading 1 --page 1 --page 2 --sub heading 2 ---page 3 ---page 4 -sub heading 3 --sub heading 4 ---page 5 User 1 has the rights to page1, page 3 and page 5 so his menu would be -sub heading 1 --page1 --sub heading 2 ---page 3 -sub heading 3 --sub heading 4 ---page 5 User 2 only has access to page3 and page 5 so their menu should be -sub heading 1 --sub heading 3 ---page 3 -sub heading 3 --sub heading 4 ---page 5 Getting the page access and finding user credentials isn’t an issue, but I’m really struggling to figure out some logic to generate the menu, keep the subheadings there if they are needed and not show anything that is blank. Has anyone done anything like this in the past? Any tips would be great, and code would be fantastic – but I’m really only looking for ideas on how to complete this. I’m sure I’m making it harder than it needs to, and I’m also sure loads of people have done this without a problem Thanks in advance

      L Offline
      L Offline
      leppie
      wrote on last edited by
      #2

      Look at TreeViewAdv on SourceForge. It has a 'mode' to pull node data on demand, and that appears what you are looking for. Hope it helps :)

      **

      xacc.ide-0.2.0.57 - now with C# 2.0 parser and seamless VS2005 solution support!

      **

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups