我希望根据我的表格行中显示的内容设置下拉列表的默认值。我已经写了下面的 switch 语句,但似乎没有完成这项工作。谁能帮忙?
bool viewNull = this._Row.Isxcs_ViewNull();
if (!viewNull)
{
switch (this._Row.xcs_View.ToUpper())
{
case "RC": this.drpdwnChaseSecSelection.SelectedValue = "Renewals Chasing"; break;
case "D_RL": this.drpdwnChaseSecSelection.SelectedValue = "Deal - Lettings"; break;
case "NULL": this.drpdwnChaseSecSelection.SelectedValue = "None"; break;
}
}
else
{
drpdwnChaseSecSelection.SelectedValue = "None";
}