简体   繁体   English

如何在 Datagridview c# 中的单个单元格中添加多个单选按钮?

[英]How to add multiple radio buttons in single cell in Datagridview c#?

I need to add three radio buttons in single cell in data grid view in c# windows forms.我需要在 c# windows forms 的数据网格视图中的单个单元格中添加三个单选按钮。

在此处输入图像描述

I need like this "3 radio buttons in single cell".我需要这样的“单个单元格中的 3 个单选按钮”。 I am using datagridview in windows form.我正在使用 windows 形式的 datagridview。

Is there any possibility to achieve this?有没有可能实现这一目标?

You could create a column for each choice as shown below.您可以为每个选择创建一列,如下所示。 The last three columns are images.最后三列是图像。 Since the code to implement is more than what seems prudent to post here check out the source in the following GitHub repository .由于要实施的代码比在这里张贴的代码要多,请查看以下GitHub 存储库中的源代码。

The code to handle selection changes for last three columns处理最后三列选择更改的代码

Edit Download the image, give it an extension of.zip, open and you will have all the source code.编辑下载图片,扩展名为.zip,打开即可获得所有源代码。 See instructions .请参阅说明

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM