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
715
Converter applied to cell not working
posted

I have a grid bound to a data source and I wish to use a converter to change some of the values in the grid. I've used a converter before to change some of the other properties such as font color and they worked fine, but when it comes to changing content there's an issue.

I've debugged the code and the converter is getting correctly called and is return the correct values, but the raw values are still displayed in the grid. My converter is just returning strings, is there a reason why it's unable to render them?

Thanks

 

 

<DataPresenter:Field Name="myField" Width="Auto">
                <DataPresenter:Field.Settings>
                  <DataPresenter:FieldSettings>
                    <DataPresenter:FieldSettings.CellValuePresenterStyle>
                      <Style TargetType="{x:Type DataPresenter:CellValuePresenter}" >
                        <Setter Property="" Value="{Binding RelativeSource={RelativeSource Self}, Path=Content, Converter={StaticResource myConverter}}" />
                      </Style>
                    </DataPresenter:FieldSettings.CellValuePresenterStyle>
                  </DataPresenter:FieldSettings>
                </DataPresenter:Field.Settings>
              </DataPresenter:Field>

 

 

 

Parents Reply Children