In my form, I want to add Permission()
like below:
DataRow[] dr2 = AppConfiguration.permission.Select("MenuNameTrim = '" + this.Name + "' AND IsCanDelete = True");
if (dr2.Length > 0)
{
dgvList.Columns[5].Visible = true;
}
else
{
dgvList.Columns[5].Visible = false;
}
I want to enable some of the grid view columns in a form according to the permissions that i set.
DataRow[] dr2 = AppConfiguration.permission.Select("MenuNameTrim = '" + this.Name + "' AND IsCanDelete = True");
if (dr2.Length > 0)
{
dgvList.Columns[5].ReadOnly= true;
}
else
{
dgvList.Columns[5].ReadOnly = false;
}
For moew detail click here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.