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. The Lounge
  3. What the hell do I need a grid control for?

What the hell do I need a grid control for?

Scheduled Pinned Locked Moved The Lounge
cssquestion
45 Posts 22 Posters 0 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.
  • A Andreas Saurwein

    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

    A Offline
    A Offline
    abc
    wrote on last edited by
    #32

    Andreas Saurwein wrote: I suppose that should read "...on CodeProject dont have to... Thanks for the correction.

    1 Reply Last reply
    0
    • P Peter Zajac

      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

      A Offline
      A Offline
      Andreas Saurwein
      wrote on last edited by
      #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

      T 1 Reply Last reply
      0
      • A Andreas Saurwein

        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

        N Offline
        N Offline
        Nick Parker
        wrote on last edited by
        #34

        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

        A 1 Reply Last reply
        0
        • M MarkSh

          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....... :(

          A Offline
          A Offline
          Andreas Saurwein
          wrote on last edited by
          #35

          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

          1 Reply Last reply
          0
          • N Nick Parker

            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

            A Offline
            A Offline
            Andreas Saurwein
            wrote on last edited by
            #36

            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

            N 1 Reply Last reply
            0
            • A Andreas Saurwein

              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

              N Offline
              N Offline
              Nick Parker
              wrote on last edited by
              #37

              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

              1 Reply Last reply
              0
              • A Andreas Saurwein

                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

                E Offline
                E Offline
                Ernest Laurentin
                wrote on last edited by
                #38

                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

                A 1 Reply Last reply
                0
                • A Andreas Saurwein

                  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

                  T Offline
                  T Offline
                  Troy Marchand
                  wrote on last edited by
                  #39

                  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.

                  A 1 Reply Last reply
                  0
                  • T Troy Marchand

                    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.

                    A Offline
                    A Offline
                    Andreas Saurwein
                    wrote on last edited by
                    #40

                    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

                    1 Reply Last reply
                    0
                    • A Andreas Saurwein

                      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

                      M Offline
                      M Offline
                      Michael A Barnhart
                      wrote on last edited by
                      #41

                      Andreas Saurwein wrote: A grid control or a listview control? Does your data require editing cells of the data? YES ""

                      1 Reply Last reply
                      0
                      • A Andreas Saurwein

                        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

                        C Offline
                        C Offline
                        ColinDavies
                        wrote on last edited by
                        #42

                        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

                        1 Reply Last reply
                        0
                        • A Andreas Saurwein

                          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

                          J Offline
                          J Offline
                          Jon Sagara
                          wrote on last edited by
                          #43

                          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

                          1 Reply Last reply
                          0
                          • E Ernest Laurentin

                            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

                            A Offline
                            A Offline
                            Andreas Saurwein
                            wrote on last edited by
                            #44

                            Ernest Laurentin wrote: And no you are not the only listview control freak! Thanks. What a relief :)


                            Off to in ~69 days

                            1 Reply Last reply
                            0
                            • A Andreas Saurwein

                              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

                              C Offline
                              C Offline
                              CAE
                              wrote on last edited by
                              #45

                              Personaly I use a grid only for a propertygrid a la VB. I first used Chris's generic grid but I later prefered to buy a specific propertygrid. Cheers

                              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