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