Hi all!
I've been playing around with the Feature browser sample: Custom CellValuePresenter Style - Advanced.
I'm trying to set the "Team" field's CellClickAction to SelectCell (it's the one with changed template). The problem is that it isn't showing when the cells are selected, altough the debugger tells me that they are. I guess this is because the template has been replaced (obviously). But what do I need to add to the template to show the selection correctly (shown in the same style and theme as the default selection for the grid).
Some IsSelected trigger in the style maybe?
this is my only modification:
<igDP:Field Name="team" Label="Team"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource myCustomFieldCell}" CellClickAction="SelectCell" /> </igDP:Field.Settings> </igDP:Field>
/Carl
Hello Carl,
This is because the in the style -- template the ContentPresenter is missing (e.g. there is nothing to enter in EditMode ). You need to add to the template this :
<ContentPresenter x:Name="PART_EditorSite" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}" Style="{TemplateBinding ForegroundStyle}"/>
You can find this in the DefaultStyles directory installed with the infragistics products on your computer.
With this added you should be able to enter EditMode of the cell.
Hope this helps,
Alex.