1
獲取的DataRow我不知道如何dropdownlist
所選項目轉換爲datarow
從DropDownList中
sDropDownList.DataSource = GetTable();
sDropDownList.DataTextField = "Name";
sDropDownList.DataValueField = "ID";
我試圖從這樣的下拉列表獲得數據行..。
DataRow row = (sDropDownList.SelectedItem as DataRowView).Row;
但我得到一個錯誤..。錯誤如無法將listitems轉換爲數據行
爲什麼要嘗試將選定的值從DropDownList轉換爲DataRow?真的沒有道理......你究竟想達到什麼目的? – walther