Articles in this section
Category / Section

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

1 min read

Using GridTemplateColumn, we can load any Control as cell content for UWP DataGrid 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

 

 

Conclusion

I hope you enjoyed learning about how to set the progress bar to a Column in UWP DataGrid.

You can refer to our UWP DataGrid feature tour page to know about its other groundbreaking feature representations. You can also explore our UWP DataGrid documentation to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

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