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