Given a bp:GridViewRowSelectColumn column in a grid, is it possible to conditionally, on a per row basis, prevent the checkbox from being present or at at least checkable?
Imagine a dataset with records and the user can check a row for deletion of that row. I need to be able to prevent deletion of certain rows based on some criteria. To make it user friendly, I would like to remove/disable the checkbox for that row. See below for an example:
The first one hides the checkbox in the GridViewRowSelectColumn. The other two change the appearance of the rest of the row so it doesn’t look like it’s been checked if the box in the header row gets checked. (Checking that box does still check the hidden boxes so you need to modify the appearance of those rows.) Use whatever colors match your application.
Important Note:
This only hides the checkbox from the user, it does not remove it from the page, nor does it prevent them from interacting with it in other ways. You must ensure the code properly checks for users being allowed to operate on selected rows.
If any Riganti team members know a better way, I’m open to additional suggestions.