Create a custom DataGridViewColumn for radio buttons

Hi,

In my application, I want to create a custom DataGridViewColumn which contains radio buttons, much like the DataGridViewCheckBoxColumn. I know I should derive from DataGridViewColumn and DataGridViewCell, but I'm not quite clear on how I should proceed. There's so little information on this topic; as far as I know, no MSDN article on this area has been written yet.

Hope that somebody here can shed me a light. Thanks a lot.

Dotnetjunky



Answer this question

Create a custom DataGridViewColumn for radio buttons

  • JoeSox

  • Scott Myers

    Is that whitepaper available now


  • Krivahn

    Has the whitepaper been created That would be really helpful for me because I need to create a datagridview with radio button column in my project.
  • SuperRock

    where is the whitepaper now

  • ErikG

    Hello,

      The whitepaper would be very useful to me since I'm trying to create a datagridview to contain password masked text boxes and progress bars.

     I found a sample msdn project that I'm trying to manipulate (found here http://winfx.msdn.microsoft.com/library/default.asp url=/library/en-us/dv_fxsamples/html/ba7b4105-e562-4a4b-8890-485c8f855c69.asp ) but it's taking longer than expected to understand exactly what needs to be done.

    -Harold



  • VB.IS.NOT.PYTHON

    where is the whitepaper
  • Mike Duke

    Greate article, unfortunately, that solution by Regis did not work for me since it requires that the user turns on "Visual Styles" in the operating system as stated in the beginning of the article:

    >>Note The implementation of the custom cell depends on Visual Styles being turned on by the operating system and the >>Windows Forms application (i.e., the application calls Application.EnableVisualStyles()). Indeed the custom cell's >>implementation uses the ScrollBarRenderer class that requires Visual Styles to be turned on.

    Since I cannot control wether the user turns on "Visual Styles" or not, I wonder if someone has come up with a way of adding radio buttons to the DataGridView without requiring "Visual Styles" to be turned on.

    Thanks,
    Adiel


  • George Jackson

    Regis, the developer for the DataGridView is creating a whitepaper with sample that demonstrates creating a radio button cell. Hope to have this done sometime and posted in the coming months.

    -mark
    DataGridView Program Manager
    Microsoft
    This post is provided "as-is"
    < xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


  • sqltechlead

    Any chance the white paper can also contain code for VB.NET

    Current white paper is C# only

    thanks,



  • Create a custom DataGridViewColumn for radio buttons