0
我在我的radgrid中有一個下拉列。該值在後面的代碼中定義:下拉列不綁定選定的值
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item is GridEditableItem && (e.Item as GridEditableItem).IsInEditMode)
{
GridEditableItem editedItem = e.Item as GridEditableItem;
GridEditManager editMan = editedItem.EditManager;
GridDropDownListColumnEditor editor = editMan.GetColumnEditor("Designation") as GridDropDownListColumnEditor;
editor.DataSource = new object[] { "TB", "Tram", "Hybrid", "Sub-systems", "Spare parts" };
editor.DataBind();
}
}
這是我的標記:
<telerik:GridDropDownColumn DataField="Designation" FilterControlAltText="Filter Designation column" HeaderText="Designation" UniqueName="Designation">
<ColumnValidationSettings>
<ModelErrorMessage Text="" />
</ColumnValidationSettings>
</telerik:GridDropDownColumn>
我可以在編輯模式下,但在更新後,當選擇在下拉值向下/插入存在沒有價值分貝。我在做什麼有什麼問題?