日期:2014-05-18  浏览次数:20855 次

souregrid加入combobox问题。高分求解
C# code



            SourceGrid.Cells.Editors.ComboBox externalIdEditor = new SourceGrid.Cells.Editors.ComboBox(typeof(int));
            externalIdEditor.StandardValues = new int[] { 1, 2, 3, 4 };
            externalIdEditor.StandardValuesExclusive = true;
            externalIdEditor.Control.FormattingEnabled = true;
            externalIdEditor.AllowNull = false;            
            

            DevAge.ComponentModel.Validator.ValueMapping mapping = new DevAge.ComponentModel.Validator.ValueMapping();
            mapping.ValueList = new int[] { 1, 2, 3, 4 };
            mapping.DisplayStringList = new string[] { "Reference 1", "Reference 2", "Reference 3", "Reference 4" };
            mapping.BindValidator(externalIdEditor);



例子29加入了combobox,为什么
  if (mView.AllowNew == false)
  {
  mView.AllowNew = true;
  mView.AddNew();
  mView.AllowNew = false;
  }

新增一行的时候,combobox列显示错误?那个cell单元显示Error:Cannot convert <null> to display String.

请问有没人知道啊

------解决方案--------------------
Cannot convert <null> to display String

没有设置值