最新下载
热门教程
- 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;
}
}
///
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16