How to set SelectedValue of DropDownList in GridView EditTemplate

后端 未结 5 1020
被撕碎了的回忆
被撕碎了的回忆 2021-01-04 20:36

I am trying to do this as asked earlier. The only difference that I found is additional List item that was included in above code.

I tried to use AppendDataBou

5条回答
  •  粉色の甜心
    2021-01-04 21:13

    DataValueField seems to be wrong - shouldn't it be DepartmentId? Similarly, you need to have SelectedValue='<%# Eval("**DepartmentId**") %>' - DepartmentName would be the SeletectText.

提交回复
热议问题