I have a datagrid which is bound to a table. I have a field nemed Typ in the datagrid which is not bound to any field. I need to display “bag” or “bulk” in the Typ field depending on there is a “B” at the end of the ProductCode field.
<sdk:DataGrid AutoGenerateColumns="False" HorizontalAlignment="Center" Margin="77,42,91,323" Name="dgScripts" Width="577" SelectionChanged="dgScripts_SelectionChanged">
<sdk:DataGrid.Columns>
<sdk:DataGridTextColumn Binding="{Binding ProductCode}" Header="Prod. Code" Width="80" />
<sdk:DataGridTextColumn Header="Type" Width="50" />
<sdk:DataGridTextColumn Binding="{Binding MedNo}" Header="Med. Code" Width="100" />
</sdk:DataGrid.Columns>
</sdk:DataGrid>
How can I do this?
You can do this by these steps: