Hello. I would simply like to disable a column in the XamDataGrid. I know I can do this:
((XamDataGrid)sender).FieldLayouts[0].Fields["Total"].Settings.AllowEdit = false;
but I want the column to took like if I was going to do something like this:
((XamDataGrid)sender).Records[2].IsEnabled = false;
So grayed out.
How can I do this?
Thanks
Thank you for the update Kris. I am glad that this approach helped you.
It did work. Thanks.
Hello Kris,
I am just checking your progress on the issue.
If you require any further assistance, please do not hesitate to ask.
Kris,
You can try to use a Dispatcher to change the priority of the operations and make sure that the CellValuePresenter was created. I am attaching here a sample application I have used to test this behavior that could be illustrates the approach.
Hi Maria,
The column that I'm working with is called "Total". I'm getting a NullPointerException in this statement CellValuePresenter.FromCell(record.Cells["Total"]). When debugging I can see that there is an initialized object in record.Cells["Total"].