2013-07-27 4 views
0

내 데이터 테이블에 데이터가 있지만 데이터 테이블에 데이터 테이블이 표시되지 않는다는 것을 알고 있습니다. 여기 제 바인딩입니다.WPF datagrid with datatable

<DataGrid Grid.Row="1" Name="DataGrid4" AutoGenerateColumns="TRUE" CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" AlternatingRowBackground="LightBlue" ItemsSource="{Binding Path=thisData.thisFollowUp.thisP.pData.dataTable.DefaultView}"/> 

데이터 테이블 데이터가 변경되었을 때 WPF에 알릴 필요가 없다는 것을 이해합니다. 내가 누락 된 아이디어가 있습니까? 필요한 경우 더 많은 코드를 추가 할 것입니다.

답변

0

DataGrid에 대해 묶음 컨테이너의 DataContext을 설정하면 ItemSource = {Binding}으로 전화하면됩니다. 코드 뒤에 데이터를로드 한 후에 DataContext을 설정할 수 있습니다. Examples