winforms devexpress GridView值失去了对未绑定列的关注

时间:2016-08-01 17:20:12

标签: c# winforms datagrid devexpress

我在devexpress GridView中有一个单元格。单元格内部包含ComboBoxRepositoryItem,当它失去焦点时,值将被重置。在selectedIndexChange上,combobox会更改应用的lookAndFeel。我将e.Column.UnboundType更改为StringObject并添加了CustomUnboundColumnData事件。事件永远不会发生。这是代码的样子。

private void gridView1_CustomUnboundColumnData(object sender, DevExpress.XtraGrid.Views.Base.CustomColumnDataEventArgs e)
        {
            if (e.Column.FieldName == "Value" && e.IsSetData)
            {
                _userEnteredData = e.Value.ToString();
            }
            else if (e.Column.FieldName == "Value" && e.IsGetData)
            {
                e.Value = _userEnteredData;
            }
        }

0 个答案:

没有答案