XML创建Table,设置属性为下拉框??100(不够可加分)
quhua 2003-09-14 02:04:45
第1步. 我自动创建XML,属性包括(FactoryName,ServerAddress,DBName,DBType).
DataTable theTable=new DataTable ("c:\MyXML.xml");
DataColumn theColumn1=new DataColumn ();
theColumn1.DataType = System.Type.GetType("System.String");
theColumn1.ColumnName = "FactoryName";
theTable.Columns.Add(theColumn1);
DataColumn theColumn2=new DataColumn ();
theColumn2.DataType = System.Type.GetType("System.String");
theColumn2.ColumnName = "ServerAddress";
theTable.Columns.Add(theColumn2);
DataColumn theColumn3=new DataColumn ();
theColumn3.DataType = System.Type.GetType("System.String");
theColumn3.ColumnName = "DBName";
theTable.Columns.Add(theColumn3);
DataColumn theColumn4=new DataColumn ();
theColumn4.DataType = System.Type.GetType("System.String");
theColumn4.ColumnName = "DBType";
theTable.Columns.Add(theColumn4);
return theTable;
第2步 在DdataGrid上显示.
问题: 我想让属性DBType(数据库类型)成为下拉框显示,可选择SQL Server 与
ORACLE. 请问下拉框怎样设置显示.