Articles in this section
Category / Section

How to set the progress bar to a Column in WinRT DataGrid?

1 min read

Using GridTemplateColumn, we can load any Control as cell content for SfDataGrid with the help of CellTemplate and CellEditTemplate. CellTemplate defines how the content is displayed in the column cell and CellEditTemplate defines how the content is displayed in the column cell when in editing mode. Using CellTemplate, we can load the ProgressBar to a column and use TextBlock within CellTemplate for displaying the cell content on that ProgressBar.

The following code sample shows, how to set the ProgressBar to column using CellTemplate

XAML

<syncfusion:GridTemplateColumn MappingName="OrderID" TextAlignment="Right">
       <syncfusion:GridTemplateColumn.CellTemplate>
             <DataTemplate>
                   <Grid>
                         <ProgressBar x:Name="progressBar" Background="Transparent"   
                                Visibility="Visible" Minimum="0" Maximum="200"       
                                Value="{Binding OrderID}" />
                         <TextBlock Text="{Binding OrderID}" HorizontalAlignment="Center"  
                                VerticalAlignment="Center" TextAlignment="Center"/>
                   </Grid>
             </DataTemplate>
       </syncfusion:GridTemplateColumn.CellTemplate>
</syncfusion:GridTemplateColumn>

 

Screenshot

F:\Issuesample\WPF-14975 progress bar\finalprog.png

Figure 1: To set the Progress Bar to a Column

 

Sample Links:

WPF

WRT

SilverLight

UWP

 

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied