i have an issue similar to this post but using styles. http://forums.infragistics.com/forums/t/32165.aspx
i have a grid with a bunch of cols in it but only 3 are for editing. lets call them a, b, c. i have logic that states you can edit Either a OR b & c. if a is disable and b & c are active, once you edit b or c it disables the other, so if you enter a 7 in cell c be would not be able to be editing any more.
i have this working for the most part. here is the style i am using to do this
<Style x:Key="myCanNotEditCell" BasedOn="{StaticResource myCellChild}" TargetType="igGrid:CellControl"> <Setter Property="Background" Value="Gray" /> <Setter Property="IsEnabled" Value="False" /> </Style>
in the dgPO_CellControlAttached AND dgPO_CellExitedEditMode i have logic that controls the setup but checking number values such as x > 0, etc.
My problem that i seem to be stuck on is when i tab from cell a to b (IsOnCellActiveEditingEnabled="true") it goes into Edit Mode even though the style above is applied
if i remove the IsOnCellActiveEditingEnabled it works fine
editing setting for ref
<igGrid:ColumnLayout.EditingSettings><igGrid:EditingSettingsOverride AllowEditing="Cell" IsMouseActionEditingEnabled="SingleClick"IsOnCellActiveEditingEnabled="true" /></igGrid:ColumnLayout.EditingSettings>
Hi,
So, did you know you can turn of editing on a Column by column basis via the ReadOnly property?
<TextColumn key="B" IsReadonly=True/>
or
((EditableColumn)grid.Columns["B"]).IsReadOnly = true;
Does this help?
-SteveZ
the scenario described above is on row by row basis. i did not see IsReadOnly on the cellControl
i have the rest of the cols in the grid set that way
The workaround i have come up with is the check again the same logic as above and set e.cancel = True on the CellEnteringEditMode Event. i was just assuming it should not be able to edit if the Cell was IsEnabled = False
sounds good!
So i agree, this just wasn't an issue that we tested for. I've submitted and fixed the issue, so that in the future there you won't need to use the events to cancel edit mode.