最新下载
热门教程
- 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;
}
}
///
相关文章
- 伊瑟隐猎赫妍角色有什么技能 08-15
- 逸剑风云决怎么获取霹雳心法 08-15
- 迷雾大陆毕业装备如何选择 08-15
- 逃离方块悖论彩旗怎么排序 08-15
- 疾风骑士诅咒圣物如何获得 08-15
- 斗罗大陆武魂觉醒开局怎么选择魂师 08-15