0
我嘗試添加文本「選擇選項」爲0個的組合框指數卻顯示空白組合框:添加文本到第0指數
public void BindDdlPartyAccount()
{
PartyAccount objDDlBind = new PartyAccount();
List<PartyAccount> ListDdlParty = new List<PartyAccount>();
ListDdlParty = objDDlBind.getDDlPartyDetails();
objDDlBind.selectOption = "Select Option";
objDDlBind.selectOptionId = 0;
ListDdlParty.Insert(objDDlBind.selectOptionId, objDDlBind);
ddlEditPartyAcc.DataSource = ListDdlParty;
ddlEditPartyAcc.ValueMember = "PAId";
ddlEditPartyAcc.DisplayMember = "name";
}
是它的工作,但爲什麼不能添加像設置objDDlBind.selectOption =「Select Option」; –
因爲您的顯示成員屬性是名稱 – Sajeetharan
確定是否得到它謝謝 –