调用SetDataBinding(object DataSource, string DataMember, bool hideNewColumns)时如何在UltraGrid上设置Key preoperty?我怎样才能将它设置为除此之外的东西?List'1
我有以下表格和课程:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.ultraGrid2.SetDataBinding(new List<row>(), string.Empty, true);
this.ultraGrid2.DisplayLayout.ColumnChooserEnabled = DefaultableBoolean.True;
// breakpoint on the above line and run the below immediate window code
}
}
public class row
{
public string Name { get; set; }
public string Address { get; set; }
}
设置数据绑定后,下面的代码总是List'1
在即时窗口中给我:
this.ultraGrid2.DisplayLayout.Bands[0].Key