What the hell do I need a grid control for?
-
Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones?
Off to in ~69 days
Every application I've written for my clients requires some sort of a list control. I've never implemented a full grid control with row color capability, etc., but I've come close, and one of my clients recently asked if I could color backordered items differently from received items. A list control (in detail mode, the only mode I use), is a necessity for displaying, ummm, a list. Purchases, dancers, boats, work orders, bill acceptor transactions, customer info, etc. Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files" -
Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones?
Off to in ~69 days
In the application I designed, there are many DataGrids. Granted, the Industrial Engineers that have written most the UI for Industrial Engineers went a little overboard on DataSets and DataGrids. The ones that should be there, however, are ones that require a lot of tabular data input or show tabular data output. There are a lot of places where a ListView would work better / look better, but what do I know. I've only been writing commercial software for 15 years and they just start coding C# last summer! The point is that they are probably overused but there is a purpose from time to time, especially for in-house or throw-away applications that need to display data quickly and easily. For commercial software, however, I believe their use should be limited.
Reminiscent of my younger years... 10 LOAD "SCISSORS" 20 RUN
-
Every application I've written for my clients requires some sort of a list control. I've never implemented a full grid control with row color capability, etc., but I've come close, and one of my clients recently asked if I could color backordered items differently from received items. A list control (in detail mode, the only mode I use), is a necessity for displaying, ummm, a list. Purchases, dancers, boats, work orders, bill acceptor transactions, customer info, etc. Marc Help! I'm an AI running around in someone's f*cked up universe simulator.
Sensitivity and ethnic diversity means celebrating difference, not hiding from it. - Christian Graus
Every line of code is a liability - Taka Muraoka
Microsoft deliberately adds arbitrary layers of complexity to make it difficult to deliver Windows features on non-Windows platforms--Microsoft's "Halloween files"Marc Clifton wrote: A list control (in detail mode, the only mode I use), is a necessity for displaying, ummm, a list. Purchases, dancers, boats, work orders, bill acceptor transactions, customer info, etc. Thats my point about it: almost any application can do nicely with a simple listview control. No need to use a bloat[^]ed grid.
Off to in ~69 days
-
In the application I designed, there are many DataGrids. Granted, the Industrial Engineers that have written most the UI for Industrial Engineers went a little overboard on DataSets and DataGrids. The ones that should be there, however, are ones that require a lot of tabular data input or show tabular data output. There are a lot of places where a ListView would work better / look better, but what do I know. I've only been writing commercial software for 15 years and they just start coding C# last summer! The point is that they are probably overused but there is a purpose from time to time, especially for in-house or throw-away applications that need to display data quickly and easily. For commercial software, however, I believe their use should be limited.
Reminiscent of my younger years... 10 LOAD "SCISSORS" 20 RUN
Tabular data input is a valid argument. Probably the only one.
Off to in ~69 days
-
Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones?
Off to in ~69 days
I've had a cute idea for our app, with majore reuse of Chris' Grid. (The idea got sacked, though) A flexible grid would be the ultimate base for customized "Property Editors". A flexible grid could replace our ugly List Control hack to display tables A grid would be the "tool of choice" for managing task/data lists of any kind, allowing customized data display, easy in-place editing, etc. But I must admit I've come across quite some "cool ways to use a good grid", but never really used one. A grid is a grid is a grid.
Italian is a beautiful language. amare means to love, and amara bitter.
sighist | Agile Programming | doxygen -
Andreas Saurwein wrote: Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones? There tend to be a lot of custom financial software packages out there, however about any program that does a search and displays a list could use something like this. -Nick Parker
Nick Parker wrote: about any program that does a search and displays a list could use something like this Any program like this could also embed a Excel worksheet, just in case you need more functionality. :omg:
Off to in ~69 days
-
Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones?
Off to in ~69 days
I haven't in a while, but in my last job, the UI of one program had tabulated input and output. A grid worked nicely there. And don't even go mentioning embedding Excel... who knows if they even will have it installed, let alone what version, etc., etc. "When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity." - Albert Einstein
-
Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones?
Off to in ~69 days
Well, to be honest, you can get a long way with something like the standard windows listview control (or similar), or with custom or automatically generated forms. But the beauty of (most) grid controls lies in their ability to standardize behavior where it would otherwise be very difficult to do so - also the beauty of Excel, IMHO. It's not so much the app is an Excel clone, it's that the app needs part of itself written as an Excel app (i use app rather than spreadsheet here, as spreadsheets are only a bit of what Excel can be and is used for). and please, no-body mention embedding Excel in your app as an alternate solution... X| Or, if you'd rather, a grid control could be thought of as a tool for generating custom forms on the fly, constrained to a more limited than usual set of rules for layout and behavior, but in return getting improved consistency in the UI. ---
But, oh god / Under the weight of life / Things seem / Brighter on the other side - David Matthews, Big Eyed Fish
-
By using a listview control as you did? :confused: A grid is not to confuse with a listview control, although they may look similar.
Off to in ~69 days
Andreas Saurwein wrote: A grid is not to confuse with a listview control, although they may look similar. I thought you were talking on a higher level, about a grid functionality...
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
-
Well, to be honest, you can get a long way with something like the standard windows listview control (or similar), or with custom or automatically generated forms. But the beauty of (most) grid controls lies in their ability to standardize behavior where it would otherwise be very difficult to do so - also the beauty of Excel, IMHO. It's not so much the app is an Excel clone, it's that the app needs part of itself written as an Excel app (i use app rather than spreadsheet here, as spreadsheets are only a bit of what Excel can be and is used for). and please, no-body mention embedding Excel in your app as an alternate solution... X| Or, if you'd rather, a grid control could be thought of as a tool for generating custom forms on the fly, constrained to a more limited than usual set of rules for layout and behavior, but in return getting improved consistency in the UI. ---
But, oh god / Under the weight of life / Things seem / Brighter on the other side - David Matthews, Big Eyed Fish
I think I lost you... Shog9 wrote: But the beauty of (most) grid controls lies in their ability to standardize behavior where it would otherwise be very difficult to do so How does a grid standardize behaviour? Shog9 wrote: a grid control could be thought of as a tool for generating custom forms on the fly Could you explain that for grid-dummies? :omg: :~
Off to in ~69 days
-
Andreas Saurwein wrote: A grid is not to confuse with a listview control, although they may look similar. I thought you were talking on a higher level, about a grid functionality...
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
No, really specific about "the grid control", whatever brand - Maunder, Dundas, roll-your-own, etc.
Off to in ~69 days
-
I think I lost you... Shog9 wrote: But the beauty of (most) grid controls lies in their ability to standardize behavior where it would otherwise be very difficult to do so How does a grid standardize behaviour? Shog9 wrote: a grid control could be thought of as a tool for generating custom forms on the fly Could you explain that for grid-dummies? :omg: :~
Off to in ~69 days
Clearly this passes for humour wherever you live :) Obviously when you only need a list and you have a small amount of read only data, then yes maybe you can manually add your items to a listview or listbox. But if you want any sort of complex databound list or an editable table, grids are your only choice. Then what about grouping, filtering available in commercial solutions all of which are necessary in commercial software. And whilst embedding an excel worksheet is an idea, again it is manual and very very slow - not to mention relying on excel being present....... :(
-
I think I lost you... Shog9 wrote: But the beauty of (most) grid controls lies in their ability to standardize behavior where it would otherwise be very difficult to do so How does a grid standardize behaviour? Shog9 wrote: a grid control could be thought of as a tool for generating custom forms on the fly Could you explain that for grid-dummies? :omg: :~
Off to in ~69 days
ah, right... that didn't make too much sense, did it? Sorry, just woke up. 'k... A form is a collection of controls displaying data, arranged in some way, and with rules describing how the user may edit that data with keyboard/mouse/etc. While very flexible, a complex form displaying large amounts of data can be difficult for users to understand and navigate. Also, generating forms programatically can be difficult and tedious for the programmer to implement. A grid control can be thought of as a speciallized form. Controls that can appear on it are more limited, and their positioning is constrained, but in return it becomes much easier for the programmer to implement programatic generation. In addition, because of the constraints placed on the types and positions of controls***** in the grid, behavior can be optimized to give the user more power in viewing and editing the data displayed (multiple selection, multiple copy/paste, etc.). It's worth noting btw, that probably the biggest use of grids (in my experience at least) is in displaying (and possibly editing) the results of database queries, where very little about the data can be assumed ahead of time. The mention of Excel is appropriate, as Excel can be and is used to develop many applications - a few examples from my experience include a payroll calculation and database, a complex pricing and report generator, and a database front end. However, at some point Excel apps can become a bad fit, as requirements and/or usage grows, and it becomes necessary to move to some other platform. *****by control here i mean something that displays a single data item, possibly allowing it to be edited - a cell in the grid, not necessarily an actual Windows control. ---
But, oh god / Under the weight of life / Things seem / Brighter on the other side - David Matthews, Big Eyed Fish
-
Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones?
Off to in ~69 days
Andreas Saurwein wrote: Looking at the most popular items on CP It is not grid control that makes it popular. It is very hard to judge an article and its attached code if the subject is about server communication or algorithm, etc. You literally have to download and set up the sample program on your machine to try it. If the setup process described in the article isn't fool-proof or the machine is missing a required component, most users will give up, unless they really need to use the code. An article about GUI, however, is relatively easy to read and judge. Most of them contain beautiful pictures, and one good picture is worth a thousand dollars (words), you know. May be that's why popular articles on CodeProject don't have to be useful, as long as they look good. P.S. There is no doubt that articles by Chris Maunder and Mike Dunn are useful and they look good, too (sucking up isn't that hard after all, :) )
-
How would I code Desktop Bob[^] without a grid?
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
Daniel Turini wrote: Desktop Bob[^] Shameless plug :rolleyes: :suss:
"If you just say porn then you get all manner of chaff and low grade stuff."
- Paul Watson, Lounge 25 Mar 03
"But a fresh install - it's like having clean sheets"
- C. Maunder Lounge 3 Mar '03
Jonathan 'nonny' Newman Homepage [www.nonny.com] [^]
-
Andreas Saurwein wrote: Looking at the most popular items on CP It is not grid control that makes it popular. It is very hard to judge an article and its attached code if the subject is about server communication or algorithm, etc. You literally have to download and set up the sample program on your machine to try it. If the setup process described in the article isn't fool-proof or the machine is missing a required component, most users will give up, unless they really need to use the code. An article about GUI, however, is relatively easy to read and judge. Most of them contain beautiful pictures, and one good picture is worth a thousand dollars (words), you know. May be that's why popular articles on CodeProject don't have to be useful, as long as they look good. P.S. There is no doubt that articles by Chris Maunder and Mike Dunn are useful and they look good, too (sucking up isn't that hard after all, :) )
Well, you describe one of the phenomenons on CP - have a good looking, blinking editcontrol which shows bitmaps in each typed character and you get a great rating, no matter how bad the code is. :) abc wrote: May be that's why popular articles on CodeProject do have to be useful, as long as they look good. I suppose that should read "...on CodeProject dont have to..." :~ As good as (some) of the articles of CM and MD are, there are others who write excellent articles too.
Off to in ~69 days
-
Looking at the most popular items on CP, I really must wonder what someone needs a grid control for? Since Windows 3.0 I am doing GUI programming and I never ever needed a grid control. Are there really so many people writing Excel clones?
Off to in ~69 days
But it's all part of the plan... ? As soon as all the grids connect through the sixth-dimentional hypercube and punctuates the very fabric of time, Cthulhu shall be awakened from his slumber in ancient R'lyeh (Ia Chutulhu, Ia, Ia, Ia) to once again return to his rigthful throne, and we - his humble servants shall see what once where, what we've only seen in His dreams before (Rith'ham Abdul Al'Hazred). Ph'nglui Mglw'nafh Cthulhu R'lyeh Wgah'nagl Fhtagn Sorry. I'm very tired and will go away now.. /moliate
The corners of my eyes catch hasty, bloodless motion - a mouse? Well, certainly a peripheral of some kind.
Neil Gaiman - Cold Colours
-
Andreas Saurwein wrote: Looking at the most popular items on CP It is not grid control that makes it popular. It is very hard to judge an article and its attached code if the subject is about server communication or algorithm, etc. You literally have to download and set up the sample program on your machine to try it. If the setup process described in the article isn't fool-proof or the machine is missing a required component, most users will give up, unless they really need to use the code. An article about GUI, however, is relatively easy to read and judge. Most of them contain beautiful pictures, and one good picture is worth a thousand dollars (words), you know. May be that's why popular articles on CodeProject don't have to be useful, as long as they look good. P.S. There is no doubt that articles by Chris Maunder and Mike Dunn are useful and they look good, too (sucking up isn't that hard after all, :) )
abc wrote: May be that's why popular articles on CodeProject
do
have to be useful, as long as they look good. Ah... time to write my "nothin' but photos of Angelina Jolie" article i think... ---But, oh god / Under the weight of life / Things seem / Brighter on the other side - David Matthews, Big Eyed Fish
-
ah, right... that didn't make too much sense, did it? Sorry, just woke up. 'k... A form is a collection of controls displaying data, arranged in some way, and with rules describing how the user may edit that data with keyboard/mouse/etc. While very flexible, a complex form displaying large amounts of data can be difficult for users to understand and navigate. Also, generating forms programatically can be difficult and tedious for the programmer to implement. A grid control can be thought of as a speciallized form. Controls that can appear on it are more limited, and their positioning is constrained, but in return it becomes much easier for the programmer to implement programatic generation. In addition, because of the constraints placed on the types and positions of controls***** in the grid, behavior can be optimized to give the user more power in viewing and editing the data displayed (multiple selection, multiple copy/paste, etc.). It's worth noting btw, that probably the biggest use of grids (in my experience at least) is in displaying (and possibly editing) the results of database queries, where very little about the data can be assumed ahead of time. The mention of Excel is appropriate, as Excel can be and is used to develop many applications - a few examples from my experience include a payroll calculation and database, a complex pricing and report generator, and a database front end. However, at some point Excel apps can become a bad fit, as requirements and/or usage grows, and it becomes necessary to move to some other platform. *****by control here i mean something that displays a single data item, possibly allowing it to be edited - a cell in the grid, not necessarily an actual Windows control. ---
But, oh god / Under the weight of life / Things seem / Brighter on the other side - David Matthews, Big Eyed Fish
Ok, now it really makes more sense :) While I agree on your view of "generating forms programatically", I dont think that a grid control is yet the right choice for implementing it. (Probably I am only a listview control freak) In most cases I find it more complicated to eliminate unwanted features from a grid, than adding new features to a list control. Yes, I did try using a grid a few times, only once a grid actually made it into one of my applications and then only as a optional control in a form designer.
Off to in ~69 days
-
Ok, now it really makes more sense :) While I agree on your view of "generating forms programatically", I dont think that a grid control is yet the right choice for implementing it. (Probably I am only a listview control freak) In most cases I find it more complicated to eliminate unwanted features from a grid, than adding new features to a list control. Yes, I did try using a grid a few times, only once a grid actually made it into one of my applications and then only as a optional control in a form designer.
Off to in ~69 days
Don't get me wrong - a listview control is all that is needed in many, many situations, and by not using it you'd only make your life harder. The right tool for the job, as always... :) ---
But, oh god / Under the weight of life / Things seem / Brighter on the other side - David Matthews, Big Eyed Fish