If you are looking for a quick, free way to upgrade your application's DataGrid look and behavior, the Extended WPF Toolkit includes a DataGrid which provides a significant upgrade over the WPF DataGrid in the .NET Framework.
Here is a simple Grid with a standard DataGrid in the first row and the Toolkit's DataGridControl in the second row. Both are bound to the same ItemsSource, an ObservableCollection of three fictional videos.
<Grid>This is what we get when running the application.
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DataGrid ItemsSource="{Binding Path=MediaCatalog, IsAsync=True}"/>
<xcdg:DataGridControl Grid.Row="1" ItemsSource="{Binding Path=MediaCatalog, IsAsync=True}"/>
</Grid>
With no customization, there's a much cleaner look. You also get an improved editing experience. When clicking into the PurchaseDate column, the grid detects that the underlying data type is DateTime, and provides a Date Picker to update the value.
For more information about features available in the control, go check out the CodePlex site (migrating soon).
Happy Coding!
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.