加上这个事件
private void gvInventory_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
GridHitInfo hitInfo = gvInventory.CalcHitInfo(e.Location);
if (hitInfo.InRowCell)
{
if (hitInfo.Column.RealColumnEdit is RepositoryItemCheckEdit)
{
gvInventory.FocusedColumn = hitInfo.Column;
gvInventory.FocusedRowHandle = hitInfo.RowHandle;
gvInventory.ShowEditor();
CheckEdit edit = gvInventory.ActiveEditor as CheckEdit;
if (edit == null) return;
edit.Toggle();
DXMouseEventArgs.GetMouseArgs(e).Handled = true;
}
}
}
网页链接
百度经验上有
1 先将CheckEdit控件的属性Properties——CheckStyle属性设置为Radio。
2 将所有CheckEdit控件的属性Properties——RadioGroupIndex设为一样的值,即可实现单选按钮效果。