整栏勾选控制类 - ColumnCheckEdit(C#.Net)
整栏勾选控制类 - ColumnCheckEdit(C#.Net)
ColumnCheckEditTool类非常适用,并且使用简单代码易懂, 快下载收藏吧!
private void simpleButton1_Click(object sender, EventArgs e)
{
//生成测试数据
DataTable dt = new DataTable();
dt.Columns.Add("CheckMarkSelection", typeof(Boolean));
dt.Columns.Add("DocNo", typeof(string));
dt.Columns.Add("Amount", typeof(decimal));
dt.Rows.Add(new object[] { true, "DO022833334", "77.33" });
dt.Rows.Add(new object[] { true, "DO022233342", "44.77" });
dt.Rows.Add(new object[] { false, "DO02283888", "33.33" });
dt.Rows.Add(new object[] { false, "DO022832", "66.33" });
dt.Rows.Add(new object[] { true, "DO84666", "33.33" });
gridControl1.DataSource = dt;
//启动勾选应用程序
ColumnCheckEditTool abc = new ColumnCheckEditTool(gvSummary, "CheckMarkSelection");
//清除勾选框
abc.ClearSelection();
}
private void simpleButton2_Click(object sender, EventArgs e)
{
checkedListBoxControl1.Items.Clear();
//获取已勾选的资料行
string keys = ColumnCheckEditTool.GetSelectedKeys(gvSummary, "DocNo");
string[] nos = keys.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
foreach (string no in nos)
checkedListBoxControl1.Items.Add(no);
}
private void simpleButton3_Click(object sender, EventArgs e)
{
//删除已勾选的资料行
ColumnCheckEditTool.RemoveCheckedRows(gvSummary);
}
// 来源:www.CSFramework.com, C/S结构框架学习网
扫一扫加作者微信
ColumnCheckEditTool类非常适用,并且使用简单代码易懂, 快下载收藏吧!
private void simpleButton1_Click(object sender, EventArgs e)
{
//生成测试数据
DataTable dt = new DataTable();
dt.Columns.Add("CheckMarkSelection", typeof(Boolean));
dt.Columns.Add("DocNo", typeof(string));
dt.Columns.Add("Amount", typeof(decimal));
dt.Rows.Add(new object[] { true, "DO022833334", "77.33" });
dt.Rows.Add(new object[] { true, "DO022233342", "44.77" });
dt.Rows.Add(new object[] { false, "DO02283888", "33.33" });
dt.Rows.Add(new object[] { false, "DO022832", "66.33" });
dt.Rows.Add(new object[] { true, "DO84666", "33.33" });
gridControl1.DataSource = dt;
//启动勾选应用程序
ColumnCheckEditTool abc = new ColumnCheckEditTool(gvSummary, "CheckMarkSelection");
//清除勾选框
abc.ClearSelection();
}
private void simpleButton2_Click(object sender, EventArgs e)
{
checkedListBoxControl1.Items.Clear();
//获取已勾选的资料行
string keys = ColumnCheckEditTool.GetSelectedKeys(gvSummary, "DocNo");
string[] nos = keys.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
foreach (string no in nos)
checkedListBoxControl1.Items.Add(no);
}
private void simpleButton3_Click(object sender, EventArgs e)
{
//删除已勾选的资料行
ColumnCheckEditTool.RemoveCheckedRows(gvSummary);
}
// 来源:www.CSFramework.com, C/S结构框架学习网
扫一扫加作者微信
版权声明:本文为开发框架文库发布内容,转载请附上原文出处连接
NewDoc C/S框架网