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. Editable Grid

Editable Grid

Scheduled Pinned Locked Moved C#
csharpcsswinformsalgorithmsquestion
4 Posts 3 Posters 1 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.
  • P Offline
    P Offline
    ProffK
    wrote on last edited by
    #1

    I wrote a little HTTP editor to modify the values of form variables in an HTTP request, without the having to hurt my eyes editing the raw text. My immediate vision was for a two column grid, for all the name=value pairs. I'm a little miffed that one has to get as extravagent as a DataGrid (WinForms) to achieve this. Another of my ideas was to use a PropertyGrid, but that requires an object with one property corresponding to each form variable, with the complexity of having to generate that object on the fly. Any ideas/suggestions on avoiding a DataGrid for such a simple application? The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.

    A 1 Reply Last reply
    0
    • P ProffK

      I wrote a little HTTP editor to modify the values of form variables in an HTTP request, without the having to hurt my eyes editing the raw text. My immediate vision was for a two column grid, for all the name=value pairs. I'm a little miffed that one has to get as extravagent as a DataGrid (WinForms) to achieve this. Another of my ideas was to use a PropertyGrid, but that requires an object with one property corresponding to each form variable, with the complexity of having to generate that object on the fly. Any ideas/suggestions on avoiding a DataGrid for such a simple application? The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.

      A Offline
      A Offline
      albCode
      wrote on last edited by
      #2

      check this http://www.dotnetjunkies.com/Article/65DC168F-B2AD-408B-8AA0-AD90DD739317.dcik

      P 1 Reply Last reply
      0
      • A albCode

        check this http://www.dotnetjunkies.com/Article/65DC168F-B2AD-408B-8AA0-AD90DD739317.dcik

        P Offline
        P Offline
        ProffK
        wrote on last edited by
        #3

        Thanks, that looks like a good read, but it's not what I'm looking for. I actually went through that exercise last year and solved it with a crude loop. This is a WinForms grid, not ASP, and they're quite different animals. I needed to edit a collection of objects not related to the database, so through my trials I learnt that the collection needed to implement IList at minimum. My collection derived from DictionaryBase, and .NET Data Binding doesn't like that, so I first tried to implement IList but it got messy. I then derived from CollectionBase, destroying my nice Dictionary based accessors etc. that operated like a Hashtable's accessors, replacing them with Add, Remove, and Item members that only return a Dictionary entry structure, leaving the onus on the client of the collection to extract name or value. Now I still need to implement IBindingList and IEditableObject before the grid will behave as I want, and I keep thinking what a mission this is for what was supposed to be a one-hour project HTTP editor. The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.

        J 1 Reply Last reply
        0
        • P ProffK

          Thanks, that looks like a good read, but it's not what I'm looking for. I actually went through that exercise last year and solved it with a crude loop. This is a WinForms grid, not ASP, and they're quite different animals. I needed to edit a collection of objects not related to the database, so through my trials I learnt that the collection needed to implement IList at minimum. My collection derived from DictionaryBase, and .NET Data Binding doesn't like that, so I first tried to implement IList but it got messy. I then derived from CollectionBase, destroying my nice Dictionary based accessors etc. that operated like a Hashtable's accessors, replacing them with Add, Remove, and Item members that only return a Dictionary entry structure, leaving the onus on the client of the collection to extract name or value. Now I still need to implement IBindingList and IEditableObject before the grid will behave as I want, and I keep thinking what a mission this is for what was supposed to be a one-hour project HTTP editor. The DJ's took pills to stay awake and play for seven days. - Jim Morrison, Black Polished Chrome.

          J Offline
          J Offline
          joe carbone
          wrote on last edited by
          #4

          Hi try this: (you find a complete collectionbase class that implement IBindingList, .....) http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=0B47DA60-DF5F-4A28-ABF7-6F8EB977FCFD

          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