How to set the progress bar to a Column in UWP DataGrid?
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
Figure 1: To set the Progress Bar to a Column
Sample Links:
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 forums, Direct-Trac, or feedback portal. We are always happy to assist you!