我正在使用Infragistics网格,并且遇到困难时使用下拉列表作为我的其中一列的值选择器。UltraWebGrid:如何在列中使用下拉列表
我试过阅读文档,但Infragistics的文档不太好。我也看过这个discussion没有运气。
我在做什么至今:
col.Type = ColumnType.DropDownList;
col.DataType = "System.String";
col.ValueList = myValueList;
其中myValueList
是:
ValueList myValueList = new ValueList();
myValueList.Prompt = "My text prompt";
myValueList.DisplayStyle = ValueListDisplayStyle.DisplayText;
foreach(MyObjectType item in MyObjectTypeCollection)
{
myValueList.ValueItems.Add(item.ID, item.Text); // Note that the ID is a string (not my design)
}
当我看网页,我希望看到在细胞中的下拉列表本专栏,但我的专栏是空的。