dev gridcontrol 单选框效果 你是多列单选一个?就用ChekedEdit自己根据逻辑判断还是一列单选?就用RadioGroup,LookUpEdit还是有ComboBoxEdit都有一样的效果 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我是多列单选一行。现在是实现多选,用的 gridview.OptionsSelection.MultiSelect = true; gridview.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect;实现 有没有人知道DEV gridcontrol实现单选框效果怎么做? DataRow dataRow=null; _dtSource 为绑定列表的数据源 repositoryItemRadioGroup1.Click += new EventHandler(repositoryItemRadioGroup1_Click); void repositoryItemRadioGroup1_Click(object sender, EventArgs e) { if (_dtSource != null && _dtSource.Rows.Count > 0 && dataRow != null) { foreach (DataRow dr in _dtSource.Rows) { dr["isDefault"] = false; } dataRow["isDefault"] = true; } } private void gvList_MouseDown(object sender, MouseEventArgs e) { DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hi = this.gvType.CalcHitInfo(new Point(e.X, e.Y)); if (hi.RowHandle < 0) { return; } dataRow = this.gvType.GetDataRow(hi.RowHandle); } http://blog.csdn.net/jiankunking/article/details/44225461试试这个吧 vs2008调试突然丢失时什么情况? C#的repace方法和正则表达式的结合用法 新手求指导 分店如何上传数据到总店 (winform) vs2010中winform程序如何生成release版本? c#Image问题,在线等! ******大家帮帮忙,哪位遇到过这样的错误----无法为字符 ' 找到匹配的引号字符。***** Winform 界面切换时为何控件中的文字堆在一起了? C#,List 自己定义的对象,根据该对象的某个属性进行排序的办法。自己的笔记贴 求助关于Datagridview外观的设置?一直困扰了好久 帮忙推荐使用哪种数据库,谢谢!! 请问:这段压缩图片的代码怎么用?
gridview.OptionsSelection.MultiSelect = true;
gridview.OptionsSelection.MultiSelectMode = DevExpress.XtraGrid.Views.Grid.GridMultiSelectMode.RowSelect;
实现
_dtSource 为绑定列表的数据源 repositoryItemRadioGroup1.Click += new EventHandler(repositoryItemRadioGroup1_Click); void repositoryItemRadioGroup1_Click(object sender, EventArgs e)
{
if (_dtSource != null && _dtSource.Rows.Count > 0 && dataRow != null)
{
foreach (DataRow dr in _dtSource.Rows)
{
dr["isDefault"] = false;
}
dataRow["isDefault"] = true;
}
} private void gvList_MouseDown(object sender, MouseEventArgs e)
{
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitInfo hi = this.gvType.CalcHitInfo(new Point(e.X, e.Y));
if (hi.RowHandle < 0)
{
return;
}
dataRow = this.gvType.GetDataRow(hi.RowHandle);
}
试试这个吧