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
170
CellValuePresenterStyle not firing a converter?
posted

Currently, I have a XamDataGrid that has a button on the grid to popup an information window.  All that works fine, but there is a requirement to not show the button if there is no data.  I have a property to return a true/false to check to see if the data is there, and then a Visibility Converter to return a Visibility based on a bool value, which I have tested on a label and it works fine.

The problem is, when on the XamDataGrid, it doesn't ever fire off the Covnerter.  Any idea why the converter would never be fired?  I set a breakpoint, and it never gets hit.  Here is my grid:

<igDP:XamDataGrid Name="OrdersGrid" GroupByAreaLocation="None">

 <

 

 

igDP:XamDataGrid.Resources>

 

 

<Style TargetType="{x:Type igEditors:XamCurrencyEditor}">

 

 

<Setter Property="Mask" Value="{}{double:25.2}" />

 

 

</Style>

 

 

<Style TargetType="{x:Type igDP:CellValuePresenter}" x:Key="hyperlinkCell">

 

 

<Setter Property="Template">

 

 

<Setter.Value>

 

 

<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">

 

 

<igRibbon:ButtonTool Click="ViewBtn_Click" Content="View" Visibility="{Binding OrdersButtonVisibility, Converter={StaticResource VisibilityConverter}} "/> </ControlTemplate> </Setter.Value> </Setter> </Style</igDP:XamDataGrid.Resources> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowEdit="True" /> </igDP:XamDataGrid.FieldSettings> igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings RecordSelectorLocation="None" AutoGenerateFields="False" AutoFitMode="Always" FieldMovingMaxRows="1" FieldMovingMaxColumns="3" AutoArrangeCells="Never" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.SortedFields> <igDP:FieldSortDescription Direction="Ascending" Field="{x:Null}" FieldName="ProductName" IsGroupBy="False" /> </igDP:FieldLayout.SortedFields> <igDP:Field Name="ProductName" Label="Name" Row="0" Column="0" /> <igDP:Field Name="Price" Label="Dose" Row="0" Column="1" Width="50"/> <igDP:Field Name="Description" Label="Given" Row="0" Column="2" Width="50"/> <igDP:Field Name="OrdersButtonVisibility" Label="Orders" Row="0" Column="3" Width="80"> <igDP:Field.Settings> <igDP:FieldSettings CellValuePresenterStyle="{StaticResource hyperlinkCell}"/> </igDP:Field.Settings> </igDP:Field> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 <