Thank you for writing back.
If I understand your requirement correctly, you will add a row to the RadGridView
after a query to database is performed. Afterwards, considering a specific information (item type) you will display/hide the GridCommandCellElement.CommandButton
. One possible approach is to use the Tag
property of the GridViewRowInfo
and store any useful information. Thus, in the CellFormatting
event you can access this information and determine whether to show the button or not. The provided code snippet will hide the entire column in RadGridView
which will affect all rows. It will not hide the CommandButton
per row. The CellFormatting
event is the appropriate place to manipulate the button's Visibility
Alternatively, you can use the grid in bound mode
. Thus, you can store the necessary information in the DataBoundItem
If it is not the exact requirement, please give us some more details about the exact requirement that you are trying to achieve. Thank you in advance.
I hope this information helps. If you have any additional questions, please let me know.