コード例 #1
0
ファイル: GuiComboBox.cs プロジェクト: zhh007/MyGen
 /// <summary>
 /// Binds a DataTable (dataSource) to the ComboBox. The valueField
 /// will be bound the the value of each list item, and the textField
 /// will be bound to the visible text of each list item.
 /// </summary>
 /// <param name="dataSource">The source DataTable to bind to the GuiComboBox</param>
 /// <param name="valueField">Identifies the column to pull the list items value from.</param>
 /// <param name="textField">Identifies the column to pull the list items text from.</param>
 public void BindDataFromTable(object dataSource, string valueField, string textField)
 {
     GuiDataBinder.BindDataToListControl(this, dataSource, valueField, textField);
 }
コード例 #2
0
ファイル: GuiComboBox.cs プロジェクト: zhh007/MyGen
 /// <summary>
 /// Binds a DataSource (ArrayList, Hashtable, NameValueCollection) to this GuiListBox.
 /// Will also bind data from any object that implements IEnumerable and has properties
 /// named "ItemName" and "ItemValue".
 /// </summary>
 /// <param name="dataSource">The data source object.</param>
 public void BindData(object dataSource)
 {
     GuiDataBinder.BindDataToListControl(this, dataSource);
 }