Hi
I have a GridViewCheckBox column which is created dynamically at runtime. I need to hide the checkboxes for particular rows based on a condition. I have seen some samples using cell template in XAML but I did not find any sample to do it using code behind or which suits this scenario. Here is the code
I need to hide the checkbox for some rows based on permissionValue.IsVisible value.
Regards
Kiran
I have a GridViewCheckBox column which is created dynamically at runtime. I need to hide the checkboxes for particular rows based on a condition. I have seen some samples using cell template in XAML but I did not find any sample to do it using code behind or which suits this scenario. Here is the code
GridViewCheckBoxColumn tempCheckBoxColumn;
foreach
(PermissionValue permissionValue
in
employeeRecords.FirstOrDefault().RolePermission)
{
tempCheckBoxColumn =
new
GridViewCheckBoxColumn()
{
Header = permissionValue.PermissionTypeDescription
,
UniqueName = permissionValue.PermissionTypeDescription
,
DataMemberBinding =
new
Binding(
"RolePermission["
+ i +
"].Value"
) { Mode = BindingMode.TwoWay }
,
DataType =
typeof
(
bool
)
};
tempDataColumn.IsReadOnly =
false
;
this
.grid.Columns.Add(tempCheckBoxColumn);
i++;
}
I need to hide the checkbox for some rows based on permissionValue.IsVisible value.
Regards
Kiran