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. General Programming
  3. C#
  4. Please help me how to create a simple RadioButton Column in DataGridView.

Please help me how to create a simple RadioButton Column in DataGridView.

Scheduled Pinned Locked Moved C#
helptutorial
6 Posts 4 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.
  • P Offline
    P Offline
    pcphuc
    wrote on last edited by
    #1

    I want to use RadioButton in DataGridView but I do not how to do that. I just need a very simple Class for getting/setting its Checked state true/false. That is all I need for this control. Please help me to that. It is urgent Thanks in advance Best Regards, pvphuc

    S 1 Reply Last reply
    0
    • P pcphuc

      I want to use RadioButton in DataGridView but I do not how to do that. I just need a very simple Class for getting/setting its Checked state true/false. That is all I need for this control. Please help me to that. It is urgent Thanks in advance Best Regards, pvphuc

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      According to your question, I hope this article willl help: Build a Custom RadioButton Cell and Column for the DataGridView Control. You can also download the code samples for the project. Windows Forms 2.0 offers several cell and column types for its DataGridView control. For example, the product ships with a text-box–based cell and column (DataGridViewTextBoxCell/DataGridViewTextBoxColumn) and a check-box–based duo (DataGridViewCheckBoxCell/DataGridViewCheckBoxColumn) among others. Even though the product comes with a rich set of cell and column types, some developers may want to create their own cell and column types to extend the functionality of the grid. Thankfully the DataGridView control architecture is extensible enough that such custom cells and columns can be built and used in the grid. This document explains how to create and use a cell and column that easily let the user pick an entry among multiple choices. http://msdn2.microsoft.com/en-us/library/aa730882(vs.80).aspx

      SSK.

      P 1 Reply Last reply
      0
      • S Sathesh Sakthivel

        According to your question, I hope this article willl help: Build a Custom RadioButton Cell and Column for the DataGridView Control. You can also download the code samples for the project. Windows Forms 2.0 offers several cell and column types for its DataGridView control. For example, the product ships with a text-box–based cell and column (DataGridViewTextBoxCell/DataGridViewTextBoxColumn) and a check-box–based duo (DataGridViewCheckBoxCell/DataGridViewCheckBoxColumn) among others. Even though the product comes with a rich set of cell and column types, some developers may want to create their own cell and column types to extend the functionality of the grid. Thankfully the DataGridView control architecture is extensible enough that such custom cells and columns can be built and used in the grid. This document explains how to create and use a cell and column that easily let the user pick an entry among multiple choices. http://msdn2.microsoft.com/en-us/library/aa730882(vs.80).aspx

        SSK.

        P Offline
        P Offline
        pcphuc
        wrote on last edited by
        #3

        Thanks Vri SSK I have read that article but it is so complex. I just need a very simple class for my work. It is always display on the cell and user can check it. Could you give me another solution. Thanks so much pvphuc

        D R 2 Replies Last reply
        0
        • P pcphuc

          Thanks Vri SSK I have read that article but it is so complex. I just need a very simple class for my work. It is always display on the cell and user can check it. Could you give me another solution. Thanks so much pvphuc

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          That sample is about as simple as it gets for what you said you want to do. There is no "very simple" way to do this.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          1 Reply Last reply
          0
          • P pcphuc

            Thanks Vri SSK I have read that article but it is so complex. I just need a very simple class for my work. It is always display on the cell and user can check it. Could you give me another solution. Thanks so much pvphuc

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

            The simple way is that, but is not a proper way u can add the asp.net label control in the gridview column and in the event of databinding of gridview u can write html (

            P 1 Reply Last reply
            0
            • R rashidpervaiz08

              The simple way is that, but is not a proper way u can add the asp.net label control in the gridview column and in the event of databinding of gridview u can write html (

              P Offline
              P Offline
              pcphuc
              wrote on last edited by
              #6

              But I am working with Window Form not Web Form.

              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