ドロップダウン リスト オブジェクトのキャストに使用する ChaseSelection クラスがあります。
今、データベースからの値をデフォルト値としてドロップダウンリストに入れようとしていますが、うまくいかないようです。誰か助けてもらえますか? ループが実行されるとは思いません。これが私のチェイスセレクションクラスで、以下のループにも入れます:ありがとう
public class ChaseSelectionItems
{
public string code { get; set; }
public string text { get; set; }
public ChaseSelectionItems(string code, string text)
{
this.code = code;
this.text = text;
}
public override string ToString()
{
return this.text;
}
}
foreach (ChaseSelectionItems items in drpdwnChaseSecSelection.Items)
{
if (items.code == _Row.xcs_View)
{
drpdwnChaseSecSelection.SelectedValue = items.text;
}
}