将选定的值从datagridview绑定到RadioButton [英] Bind a selected Value from datagridview to RadioButton

查看:158
本文介绍了将选定的值从datagridview绑定到RadioButton的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用C#.net将datagridview中的列值绑定到winforms中的单选按钮?

how to bind a column value from datagridview to radiobutton in winforms using C#.net?

推荐答案

我想您要基于以下内容设置单选按钮的值gridview中的选择
这可以通过
完成
GridViewRow行= GridView1.SelectedRow;
TextBox2.Text = row.Cells [2] .Text;
if(TextBox2.Text ==某事")
rdobtn.value = true;
其他
rdobtn.value = false;
I think you want to set the value for radio button based on the selection in the gridview
this can be done by

GridViewRow row = GridView1.SelectedRow;
TextBox2.Text = row.Cells[2].Text;
if(TextBox2.Text=="Something")
rdobtn.value=true;
else
rdobtn.value=false;


查看此链接

http://arsalantamiz.blogspot.com/2008/09/using-datagridview- checkbox-column-as.html [ ^ ]
see this link

http://arsalantamiz.blogspot.com/2008/09/using-datagridview-checkbox-column-as.html[^]


这篇关于将选定的值从datagridview绑定到RadioButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆