最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
绑定填充comobox控件
时间:2008-01-12 编辑:简简单单 来源:一聚教程网
#region "绑定填充comobox控件"
public class MyComboBoxControl
{
#region "自定义字段"
private string tIndexFieldName;
private string tValueFieldName;
private System.Collections.ArrayList tSourceArray;
private System.Windows.Forms.ComboBox tComboBox;
private System.Data.DataTable tSourceDataTable;
private string tError="";
private string[] tOtherField;
#endregion
#region "自定义属性"
///
///填充时可能发生的错误信息
///
public string error
{
get
{
return tError;
}
}
///
/// Combo控件可以绑定的数据表
///
public System.Data.DataTable SoureDataTable
{
get
{
return tSourceDataTable;
}
set
{
tSourceDataTable=value;
}
}
///
/// 保存数据的数组集合,将做为combo的数据源
///
public System.Collections.ArrayList SoureArray
{
get
{
return tSourceArray;
}
set
{
tSourceArray=value;
}
}
///
///数据源表提供的索引字段名称
///
public string IndexFieldName
{
get
{
return tIndexFieldName;
}
set
{
tIndexFieldName=value;
}
}
///
public class MyComboBoxControl
{
#region "自定义字段"
private string tIndexFieldName;
private string tValueFieldName;
private System.Collections.ArrayList tSourceArray;
private System.Windows.Forms.ComboBox tComboBox;
private System.Data.DataTable tSourceDataTable;
private string tError="";
private string[] tOtherField;
#endregion
#region "自定义属性"
///
///填充时可能发生的错误信息
///
public string error
{
get
{
return tError;
}
}
///
/// Combo控件可以绑定的数据表
///
public System.Data.DataTable SoureDataTable
{
get
{
return tSourceDataTable;
}
set
{
tSourceDataTable=value;
}
}
///
/// 保存数据的数组集合,将做为combo的数据源
///
public System.Collections.ArrayList SoureArray
{
get
{
return tSourceArray;
}
set
{
tSourceArray=value;
}
}
///
///数据源表提供的索引字段名称
///
public string IndexFieldName
{
get
{
return tIndexFieldName;
}
set
{
tIndexFieldName=value;
}
}
///
相关文章
- 天龙八部手游绑定元宝如何使用 绑元买什么好 07-19
- 天龙八部手游元宝绑定元宝银两铜币使用攻略 07-18
- 摩拜单车如何更换绑定号码 06-29
- 捞月狗怎么绑定角色 捞月狗绑定角色的方法 03-17
- 驾考宝典如何绑定教练?驾考宝典绑定教练方法 02-23
- 英语趣配音怎么绑定账号 英语趣配音绑定账号教程 12-19