最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
绑定填充comobox控件
时间:2022-07-02 11:56:20 编辑:袖梨 来源:一聚教程网
#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-12
- 剑星桃乐丝服装怎么获取 桃乐丝服装获取方式介绍 07-12
- 无畏契约源能行动星礈怎么玩 星礈实战技巧教学 07-12
- 魔兽世界wlk血精灵怎么练级-wlk血精灵练级路线推荐 07-12
- 前端水印的简单实现代码示例 07-12
- ps后期调出大光比的古风人像大片教程 07-12