Hey Guys,
I have a XamDataGrid (Infragistics 14, .Net 4.0, Windows 7) with a couple of editable columns. Although these columns are generally editable, there are data points in each row that might make the particular cell read only. I am currently using the grid's EditModeStarting event to stop the ability to edit the cells that meet the particular condition.
This is working fine in regards to limiting the editability of the specific cell but I also need to remove the styling that I have on editable cells. All of my editable columns have a green background but the cells in these columns that meet the specific criteria should not have the green background. Is there a way to remove the styling so it never shows up on the cells that meet the read only criteria? Ideally, there would be an AllowEdit property that I can set on the cell level instead of just the field level - is there something like this?
Thanks in advance!
So I was able to fix both of my requirements by using the EditModeStarting event to cancel editing on cells that meet a criteria and the InitializeCellValuePresenter to remove the styling from cells that meet the criteria. Although this works fine, I'm wondering if there's a better way to go about doing this? Thank you.
In addition to the above two criteria, I need to remove any editorStyles associated with the specific cells that match the criteria - XamComboEditor or XamDateTimeEditor for example - because they end up showing dropdown keys even though the specific cell is not editable.
So in summary: