[MultiRow6.0]怎样给关闭筛选行的下拉列表绑定事件
想实现的功能:在筛选行的下拉列表中选择后一个项目后触发指定的事件.应该怎样绑定这个事件呢? 回复 1楼piqiu的帖子
DropDownList里面的项目是可以定制的,你可以选择自己定制这个HeaderDropDownList,并处理不同项目的Click事件,参考下面代码:
private void Form1_Load(object sender, EventArgs e)
{
DropDownSortItem dropDownSortItem1 = new DropDownSortItem();
dropDownSortItem1.Click += dropDownSortItem1_Click;
DropDownSortItem dropDownSortItem2 = new DropDownSortItem();
DropDownSeparatorItem dropDownSeparatorItem1 = new DropDownSeparatorItem();
DropDownShowAllFilterItem dropDownShowAllFilterItem1 = new DropDownShowAllFilterItem();
DropDownBlanksFilterItem dropDownBlanksFilterItem1 = new DropDownBlanksFilterItem();
DropDownNonBlanksFilterItem dropDownNonBlanksFilterItem1 = new DropDownNonBlanksFilterItem();
DropDownAutoFilterItem dropDownAutoFilterItem1 = new DropDownAutoFilterItem();
HeaderDropDownList headerDropDownList1 = new HeaderDropDownList("textBoxCell1", new DropDownItem[] { dropDownSortItem1,
dropDownSortItem2,dropDownSeparatorItem1,dropDownShowAllFilterItem1,dropDownBlanksFilterItem1,dropDownNonBlanksFilterItem1,dropDownAutoFilterItem1});
(this.gcMultiRow1.ColumnHeaders.Cells as ColumnHeaderCell).DropDownList = headerDropDownList1;
}
void dropDownSortItem1_Click(object sender, EventArgs e)
{
//Do some thing.
}
页:
[1]