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. .NET (Core and Framework)
  4. Using designer to fill an ArrayList

Using designer to fill an ArrayList

Scheduled Pinned Locked Moved .NET (Core and Framework)
designdata-structures
2 Posts 1 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
    spaceus
    wrote on last edited by
    #1

    What I wanna do is to be able to fill an ArrayList from my designer... what I got is this public class WebCustomControl1 : System.Web.UI.WebControls.WebControl { private ArrayList liste = new ArrayList(); . . public ArrayList Liste { set { foreach(string ele in value) { liste.Add(ele); } } get { return liste; } } .... If I fill the Array 'hardcode style' I can see the elements but I can't add new elements in the designer... How terrible is wisdom when it brings no profit to the wise

    S 1 Reply Last reply
    0
    • S spaceus

      What I wanna do is to be able to fill an ArrayList from my designer... what I got is this public class WebCustomControl1 : System.Web.UI.WebControls.WebControl { private ArrayList liste = new ArrayList(); . . public ArrayList Liste { set { foreach(string ele in value) { liste.Add(ele); } } get { return liste; } } .... If I fill the Array 'hardcode style' I can see the elements but I can't add new elements in the designer... How terrible is wisdom when it brings no profit to the wise

      S Offline
      S Offline
      spaceus
      wrote on last edited by
      #2

      public string Liste { set { liste.Clear(); char[] seps = { ';'}; String[] values = value.Split(seps); liste.AddRange(values); } this seems to solve my problem but is there no other way? How terrible is wisdom when it brings no profit to the wise

      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