I have a requirement of disabling a perticular cell in a row, depending on values in other cells of the same row.
WPF or WPF MVVM scenarios, both solutions are welcome.
I tried both and none works!!!
Hello Anshuman,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi Stefan,
This works like a charm!!! I had implemented using the CellUpdated event and
CellValuePresenter.FromCell((dgOccurSpanCodes.Records[index] as DataRecord).Cells[1]).IsEnabled = false;
And it worked too. But it was not working at the form load.
Now your code allows me to do that too!!!
Thanks a tonne!!!
Cheers,
Anshuman
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I created a Style for the CellValuePresenter and used Converter to set the IsEnabled Property based on one of the other Cells’ Value. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.