[DevExpress Support Team: MOVED FROM How to display disabled buttons for particular cells within a ButtonEdit column]
In my case I have a repository with 2 buttons and each button can enabled/disabled independently so if I want to cover all the cases I need 4 repositories which is not ideal.
Anything else I could do?
Thanks.
How to display ButtonEdit with disabled buttons for particular cells
Answers approved by DevExpress Support
Hi,
Creating the required amount of repository items which cover all possible scenarios is the best and easiest way to achieve your goal.
Let me know if you have additional questions.
Hi,
I'm having some problems with the update of the repository.
When I click one of the button of the repository, some code is executed in the background. This triggers the event CustomRowCellEdit as expected. Within the event handler, I modify the repository to the right one, however the UI doesn't update. It only updates when the focus changes.
Any idea why and how can I fix this?
Hi Carole,
>>This triggers the event CustomRowCellEdit as expected
The CustomRowCellEdit event is triggered only when the GridControl is being painted. Since the assigned in-place editor defines the cell appearance, this event is raised for each cell. In order to manually force GridControl repainting, utilize the GridView.RefreshRowCell/RefreshRow/RefreshDatamethods. If new editor assignment affects the currently opened cell, I suggest you save any changes made before executing any code (by using the GridView.CloseEditor method) and then re-open the same cell if necessary (by using the GridView.ShowEditor method)
Please try this approach and let us know the results.