What the hell do I need a grid control for?
-
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
-
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 use grid controls in many of my applications. I do work in medical research and many times you need to list patients, cases, and other data mostly read by a database. Chris's grid control is very good displaying lists of things and I use it anywhere a listbox would be used. I wish there was a WTL version so I could move some of my development in that direction. John
-
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
Common reasons why people switch from a ownerdrwa list view to a grid control are: 1. ease of use. 2. ease of customization on cell level. Often people want to add some display flexibility to your data (color, font, celltypes, etc.). 3. ability to display real time data. 4. foot print. For example Ultimate Grid (by Dundas) only adds around 100k to your application size! 5. performance. In many cases people need to show a data result that is 100's of thousands of rows, the a list view can be used for this but it is much simpler and faster to use a third party grid control that already has support for what you need. After all would you rather spend days developing your own implementation of the list view, or would you rather spend that $500 and start using it right away. And as a bonus you get technical support if you run into any problems. Peter
-
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
-
Common reasons why people switch from a ownerdrwa list view to a grid control are: 1. ease of use. 2. ease of customization on cell level. Often people want to add some display flexibility to your data (color, font, celltypes, etc.). 3. ability to display real time data. 4. foot print. For example Ultimate Grid (by Dundas) only adds around 100k to your application size! 5. performance. In many cases people need to show a data result that is 100's of thousands of rows, the a list view can be used for this but it is much simpler and faster to use a third party grid control that already has support for what you need. After all would you rather spend days developing your own implementation of the list view, or would you rather spend that $500 and start using it right away. And as a bonus you get technical support if you run into any problems. Peter
Peter Zajac wrote: 1. ease of use :omg: Any grid that I have seen so far makes it pretty difficult to use compared with a list/listview control. Naturally, because it adds a lot of functionality too. Peter Zajac wrote: 2. ease of customization on cell level. Often people want to add some display flexibility to your data (color, font, celltypes, etc.). X| When this is really, really, needed then it can be done really, really easily with the standard windows controls too. Peter Zajac wrote: 3. ability to display real time data. Ever heard of the "virtual" listview data? Peter Zajac wrote: 4. foot print. Standard windows controls: 0k Peter Zajac wrote: 5. performance. In many cases people need to show a data result that is 100's of thousands of rows, the a list view can be used for this but it is much simpler and faster to use a third party grid control that already has support for what you need. No grid control can possibly ever be faster than a normal list/listview control. And done right, a virtual listview control can show millions of records without any timing problems. So I rather keep that $500. :)
Off to in ~69 days
-
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
Andreas Saurwein wrote: Any program like this could also embed a Excel worksheet, just in case you need more functionality. That assumes that your user has a lisence for Excel. -Nick Parker
-
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....... :(
Well, it wasnt meant to be funny. The only and really only valid argument for a grid is the "editable table" which further may be refined as "editable table in every cell and easily navigateable". For every other use a grid is overkill. Grouping and filtering can be implemented very fine in any list/listview control and is even already available out-of-the-box in the latest common controls.
Off to in ~69 days
-
Andreas Saurwein wrote: Any program like this could also embed a Excel worksheet, just in case you need more functionality. That assumes that your user has a lisence for Excel. -Nick Parker
Nick Parker wrote: That assumes that your user has a lisence for Excel. :eek: What? Dont tell me you dont deliver a MS Office 12 licence with your product. :cool:
Off to in ~69 days
-
Nick Parker wrote: That assumes that your user has a lisence for Excel. :eek: What? Dont tell me you dont deliver a MS Office 12 licence with your product. :cool:
Off to in ~69 days
Andreas Saurwein wrote: What? Dont tell me you dont deliver a MS Office 12 licence with your product. It's just the idea. ;) -Nick Parker
-
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
I agree with you Andreas on that one! the LISTVIEW control is an excellent control. And no you are not the only listview control freak! ;P ÿFor the bread of God is he who comes down from heaven and gives life to the world. - John 6:33
-
Peter Zajac wrote: 1. ease of use :omg: Any grid that I have seen so far makes it pretty difficult to use compared with a list/listview control. Naturally, because it adds a lot of functionality too. Peter Zajac wrote: 2. ease of customization on cell level. Often people want to add some display flexibility to your data (color, font, celltypes, etc.). X| When this is really, really, needed then it can be done really, really easily with the standard windows controls too. Peter Zajac wrote: 3. ability to display real time data. Ever heard of the "virtual" listview data? Peter Zajac wrote: 4. foot print. Standard windows controls: 0k Peter Zajac wrote: 5. performance. In many cases people need to show a data result that is 100's of thousands of rows, the a list view can be used for this but it is much simpler and faster to use a third party grid control that already has support for what you need. No grid control can possibly ever be faster than a normal list/listview control. And done right, a virtual listview control can show millions of records without any timing problems. So I rather keep that $500. :)
Off to in ~69 days
It is true that you could spend the time to make as many modifications to the listview control as you like. But the main point here is 'time'. With a full grid control all of the hard work has already been done. For example: How much time would it take you to add a masked edit field to a column within a listview? With a grid such as Ultimate Grid, it is a single line of code. Now, I am not saying that there is not a place for a listview control, but if you do need more capabilities than just showing a simple list then a grid control is much more cost effective.