0
目前我有一個組合框從xml數據庫的名稱字段填充。我有以下的代碼來做到這一點:C#組合框文本
XmlDocument xmlReturnDoc = new XmlDocument();
xmlReturnDoc.Load("Data.xml");
XmlNodeList xnList = xmlReturnDoc.SelectNodes("/Students/Student");
foreach (XmlNode xn in xnList)
{ string firstName = xn["FirstName"].InnerText;
string middleInitial = xn["MiddleInitial"].InnerText;
string lastName = xn["LastName"].InnerText;
NewLessonStudentComboBox.DataSource = Students;
NewLessonStudentComboBox.DisplayMember = "DisplayName"; }
這將填充組合框下拉,唯一的事情是我想要的原始字段留白,我該怎麼辦呢?
完美,謝謝! – 2009-11-03 22:51:05