Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added DataGridLoadedWithList.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# How to bind the list of string to WPF DataGrid(SfDataGrid)?
# How to Bind the List of String to WPF DataGrid?

## About the sample
This sample illustrates how to bind the list of string to [WPF DataGrid](https://www.syncfusion.com/wpf-controls/datagrid) (SfDataGrid).

This sample illustrates how to bind the list of string to [WPF DataGrid](https://www.syncfusion.com/wpf-ui-controls/datagrid) (SfDataGrid).

[WPF DataGrid](https://www.syncfusion.com/wpf-ui-controls/datagrid) (SfDataGrid) is bound to a collection with a class type. You can bind a list of string as an ItemsSource of SfDataGrid can be achieved by using [GridTemplateColumn](https://help.syncfusion.com/cr/cref_files/xamarin/Syncfusion.SfDataGrid.XForms~Syncfusion.SfDataGrid.XForms.GridTemplateColumn.html).
`DataGrid` is bound to a collection with a class type. You can bind a list of string as an ItemsSource of `DataGrid` can be achieved by using [GridTemplateColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.Grid.GridTemplateColumn.html).

```c#
public class ViewModel
Expand Down Expand Up @@ -46,7 +44,4 @@ public class ViewModel
</Grid>
```

KB article - [How to bind the list of string to WPF DataGrid(SfDataGrid)?](https://www.syncfusion.com/kb/11357/how-to-bind-the-list-of-string-to-wpf-datagrid-sfdatagrid)

## Requirements to run the demo
Visual Studio 2015 and above versions
![DataGrid bound with List](DataGridLoadedWithList.png)