二开·隐藏列表工具条原创
3人赞赏了该文章
598次浏览
编辑于2021年11月16日 09:45:21
public override void AfterBindData(EventArgs e)
{
base.AfterBindData(e);
//获取所有列表菜单项
BarDataManager bar = this.ListView.BillLayoutInfo.GetFormAppearance().ListMenu;
foreach (var barItem in bar.BarItems)
{
//隐藏除过滤和刷新外所有菜单项
if (barItem.Key.Equals("tbFilter") || barItem.Key.Equals("tbRefresh"))
{
continue;
}
this.View.GetMainBarItem(barItem.Key).Visible = false;
}
}
推荐阅读