一览页的下拉框中进行勾选

 一般勾选由绑定的数据源的true和false来决定

public string select { get; set; }
//bool chage = false;
public bool isSelect
{
get
{
if (buttonList.Where(p=>p.text=="查询").ToList().Count>0)
return true;
return false;
}
set
{
if (value == true)
select = "查询";
else
select = "";
}
}

通过修改数据源 就行勾选还是不选

if (_info.Column.Name == "gcCX")
{
if (this.MenuDataList[_info.RowHandle].isSelect)
{
//MenuDataList[_info.RowHandle].buttonList.Remove(MenuDataList[_info.RowHandle].buttonList.Where(p=>p.text=="查询").ToList()[0]);
//MenuDataList[_info.RowHandle].disButtonList.Add(new Models.Button() { text = "查询", menuId = MenuDataList[_info.RowHandle].menuId });
this.MenuDataList[_info.RowHandle].isSelect = false;
}
else
{
//MenuDataList[_info.RowHandle].buttonList.Add(new Models.Button() { text="查询",menuId= MenuDataList[_info.RowHandle].menuId,code="select" });
//if (MenuDataList[_info.RowHandle].disButtonList.Count > 0)
//{
// MenuDataList[_info.RowHandle].disButtonList.Remove(MenuDataList[_info.RowHandle].disButtonList.Where(p => p.text == "查询").ToList()[0]);
//}
this.MenuDataList[_info.RowHandle].isSelect = true;

}
}

 

 

 

 

 

 

posted on 2019-11-22 14:31  伍佰仟  阅读(207)  评论(0)    收藏  举报