What the hell do I need a grid control for?
-
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.
-
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.
Troy Marchand wrote: 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. With the listview I have put together during the last years, its two lines of code and you get whatever control you want there. And I had my share of the Ultimate Grid already, thanks. And I am sure that in the last 4 years there where not enough changes to make it a 1 liner. Anyway, for anyone that really requires a grid it is probably still the best choice.
Off to in ~69 days
-
A grid control or a listview control? Does your data require editing cells of the data? If so, a grid is appropriate, otherwise a listview control will do.
Off to in ~69 days
Andreas Saurwein wrote: A grid control or a listview control? Does your data require editing cells of the data? YES ""
-
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
Last year I made a quick prototype App using the "Maunder" grid control for the first time. The Grid Control after some mangling was the best approach for the APP. In my opinion. The Grid was used to design a Pseudo-map graphically of a land area to show the land usage. Each of the Cells was able to not only contain a color and an Icon / Flag but also more detailed information, for when the user selected a cell. Since then I've had no use for the grid control. Regardz Colin J Davies
Sonork ID 100.9197:Colin
Warning Link to the minion's animation, do not use. It's a real shame that people as stupid as you can work out how to use a computer. said by Christian Graus in the Soapbox
-
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 wrote a little utility that uses a grid control: http://www.sagara.org/ce03.jpg[^] IMHO, this looks much nicer than would a hacked-up list control that tries to accomplish the same thing.
Jon Sagara
You know the world is off tilt, when the best rapper is a white guy, the best golfer is a black guy, the tallest basketball player is Chinese, and Germany doesn't want to go to war. -- Charles Barkley
-
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
Ernest Laurentin wrote: And no you are not the only listview control freak! Thanks. What a relief :)
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