I am used the below codes in datagridtemplateprogressbarcolumn and its working fine progress But how to give the percentage along with this below code. The below code is working for progress only,How to show percentage along with that code.
In xaml file:-
<DataGridTemplateColumn Header="Progress" Width="*" Visibility="Visible">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ProgressBar Value="{Binding Path=Progress, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Minimum="0" Maximum="100" />
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
In c#code:-
DataRow row2 = new DataRow();
row2["Progress"] = current;
This progress is working fine,But how to show percentage along with this datagridprogressbarcolumn in WPF
This should do it (not tested, but you should get the idea):
<DataGridTemplateColumn Header="Progress" Width="*" Visibility="Visible">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Progress}" HorizontalAlignment="Center" />
<ProgressBar Value="{Binding Path=Progress, Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" Minimum="0" Maximum="100" Height="25" />
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
BTW, normally the binding for your ProgressBar should be OneWay
.