Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
582
Custom CellValuePresenter Style - Advanced Sample. And selecting cells with new templates
posted

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

  • 69686
    posted

     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.