Hi Shamjith,
Thank you for the question.
In order to get the desired result, you should use the CellFormatting event handler instead of the RowFormatting one. In addition, please note that when you want to change something regarding the CellElements and RowElements, you should get them from the event args of the event handler. Otherwise, if you try accessing them, in a foreach loop, traversing the Rows collection of RadGridView, you may end up with an exception, since a GridViewDataRowInfo may not have a corresponding CellElement at a specific moment.
Concerning your scenario, it will be best if you keep a value in a separate column that governs which will be the visible button - "Apply" or "Remove" - for a specific row. I have demonstrated the approach in the sample project attached.
I hope this helps. If you have additional questions, feel free to contact me.
Best wishes,
Nikolay
the Telerik team
Check out
Telerik Trainer, the state of the art learning tool for Telerik products.