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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Grid control with Check boxes....Please Help

Grid control with Check boxes....Please Help

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsshelp
6 Posts 3 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.
  • R Offline
    R Offline
    Rajesh_Parameswaran
    wrote on last edited by
    #1

    Hi there, I working in VC 6.0, in which I need to polulate the datas in a grid. One of the field may contain values either text or a check box. So how can I implement a column which have only text in some rows and the some rows having check boxes. Which control should I use, a Data Grid or a List Control? thanks in advance. regards, Rajesh

    I 1 Reply Last reply
    0
    • R Rajesh_Parameswaran

      Hi there, I working in VC 6.0, in which I need to polulate the datas in a grid. One of the field may contain values either text or a check box. So how can I implement a column which have only text in some rows and the some rows having check boxes. Which control should I use, a Data Grid or a List Control? thanks in advance. regards, Rajesh

      I Offline
      I Offline
      Iain Clarke Warrior Programmer
      wrote on last edited by
      #2

      Rajesh_Parameswaran wrote:

      Which control should I use, a Data Grid or a List Control?

      It's really up to you, and dependent on your familiarity with each, other app specific details. I'd also throw in a recomendation for GridCtrl (by our very own C Maunder), and the newer version posted a few months ago. They can take data from a variety of sources, and you can have cells with all sorts of type of data. Checkbox, text, number, colour pickers and (written by me!) progress bars. Iain.

      Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

      R R 2 Replies Last reply
      0
      • I Iain Clarke Warrior Programmer

        Rajesh_Parameswaran wrote:

        Which control should I use, a Data Grid or a List Control?

        It's really up to you, and dependent on your familiarity with each, other app specific details. I'd also throw in a recomendation for GridCtrl (by our very own C Maunder), and the newer version posted a few months ago. They can take data from a variety of sources, and you can have cells with all sorts of type of data. Checkbox, text, number, colour pickers and (written by me!) progress bars. Iain.

        Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        Hey pal! Good to see you again after a while. Where were you? :-D

        Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

        I 1 Reply Last reply
        0
        • R Rajesh R Subramanian

          Hey pal! Good to see you again after a while. Where were you? :-D

          Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP

          I Offline
          I Offline
          Iain Clarke Warrior Programmer
          wrote on last edited by
          #4

          I've been on a customer's site a lot recently, with internet access on borrowed PCs to check emails, and that's about it. Rumours of my death have been exagerated. Sadly, I've only come up for air for only a few days. Then back into hiding... Iain.

          Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

          1 Reply Last reply
          0
          • I Iain Clarke Warrior Programmer

            Rajesh_Parameswaran wrote:

            Which control should I use, a Data Grid or a List Control?

            It's really up to you, and dependent on your familiarity with each, other app specific details. I'd also throw in a recomendation for GridCtrl (by our very own C Maunder), and the newer version posted a few months ago. They can take data from a variety of sources, and you can have cells with all sorts of type of data. Checkbox, text, number, colour pickers and (written by me!) progress bars. Iain.

            Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

            R Offline
            R Offline
            Rajesh_Parameswaran
            wrote on last edited by
            #5

            Hi There, Thanks for your response. One more question: I'm using a ListCtrl with the LVS_EX_CHECKBOXES option. Now I get the checkbox in the first column of the list control. Is it possible to move the check box to any other column in the list control? thanks in advance. regards, Rajesh

            I 1 Reply Last reply
            0
            • R Rajesh_Parameswaran

              Hi There, Thanks for your response. One more question: I'm using a ListCtrl with the LVS_EX_CHECKBOXES option. Now I get the checkbox in the first column of the list control. Is it possible to move the check box to any other column in the list control? thanks in advance. regards, Rajesh

              I Offline
              I Offline
              Iain Clarke Warrior Programmer
              wrote on last edited by
              #6

              Rajesh_Parameswaran wrote:

              Is it possible to move the check box to any other column in the list control?

              Nope! Doing a search for LVS_EX_CHECKBOXES, it pointed me at the ListView_GetCheckState "function". A search of the headers showed this a macro wrapper around LVM_GETITEMSTATE. Further investigation shows this affects a list item, not a sub item. Maybe you could use owner draw, detect mouse clicks, and use hit test messages and write your own subclasses list control that has sub-checks, but I doubt it's worth the effort when you have other controls as I described in my last email. Iain.

              Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

              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