Wednesday 5 June 2013

Difference between ListView and DataGrid in WPF

1- The difference between ListView and DataGrid is Editing. 
Edit allow in datagrid  but not in ListView. You can also edit in ListView, but it is easy and build in DataGrid.

2-Automatic column generation support in Datagrid only.



<DataGrid Height="200" Width="500" HorizontalAlignment="Left" Margin="12,21,0,0"
  Name="McDataGrid" VerticalAlignment="Top" RowHeight="30" ColumnWidth="100>
</DataGrid>
 


Selection Mode in DataGrid
The SelectionMode property decides if the DataGrid allows only a single row or multiple rows selection. It has two values  Single and Extended.  The following code sets the SelectionMode to Single .
SelectionMode="Single "
 

Scrolling

VerticalScrollBarVisibility="Visible"
HorizontalScrollBarVisibility="Visible"

Read Only
IsReadOnly="True"

All these are the property of Datagrid.  

 

1 comment:

  1. Mission-It : Online Software Training Program: Difference Between Listview And Datagrid In Wpf >>>>> Download Now

    >>>>> Download Full

    Mission-It : Online Software Training Program: Difference Between Listview And Datagrid In Wpf >>>>> Download LINK

    >>>>> Download Now

    Mission-It : Online Software Training Program: Difference Between Listview And Datagrid In Wpf >>>>> Download Full

    >>>>> Download LINK y9

    ReplyDelete