{"action":"created","issue":{"url":"https://api.github.com/repos/GuOrg/Gu.Wpf.DataGrid2D/issues/32","repository_url":"https://api.github.com/repos/GuOrg/Gu.Wpf.DataGrid2D","labels_url":"https://api.github.com/repos/GuOrg/Gu.Wpf.DataGrid2D/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/GuOrg/Gu.Wpf.DataGrid2D/issues/32/comments","events_url":"https://api.github.com/repos/GuOrg/Gu.Wpf.DataGrid2D/issues/32/events","html_url":"https://github.com/GuOrg/Gu.Wpf.DataGrid2D/issues/32","id":324642935,"number":32,"title":"How to make TwoWay binding with templates?","user":{"login":"odinsacred","id":17182565,"avatar_url":"https://avatars1.githubusercontent.com/u/17182565?v=4","gravatar_id":"","url":"https://api.github.com/users/odinsacred","html_url":"https://github.com/odinsacred","followers_url":"https://api.github.com/users/odinsacred/followers","following_url":"https://api.github.com/users/odinsacred/following{/other_user}","gists_url":"https://api.github.com/users/odinsacred/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsacred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsacred/subscriptions","organizations_url":"https://api.github.com/users/odinsacred/orgs","repos_url":"https://api.github.com/users/odinsacred/repos","events_url":"https://api.github.com/users/odinsacred/events{/privacy}","received_events_url":"https://api.github.com/users/odinsacred/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-19T16:44:01Z","updated_at":"2018-05-19T18:51:25Z","closed_at":null,"author_association":"NONE","body":"Hello! Can anybody help me? I wanna bind 2D int array to DataGrid, but I don't understand how to create TwoWay binding. Now I'm use this code:\r\n\r\n```\r\n<DataGrid Grid.Column=\"1\" Grid.Row=\"1\" x:Name=\"AutoColumns\"\r\n    dataGrid2D:ItemsSource.Array2D=\"{Binding Path=Data2D, Mode=TwoWay}\"\r\n    dataGrid2D:ItemsSource.ColumnHeadersSource=\"{Binding ColumnHeaders}\"\r\n    dataGrid2D:ItemsSource.RowHeadersSource=\"{Binding RowHeaders}\"\r\n    ColumnWidth=\"50\"\r\n    SelectionUnit=\"Cell\"\r\n    IsReadOnly=\"False\"\r\n    IsEnabled=\"True\">\r\n<dataGrid2D:Cell.Template>\r\n<DataTemplate>\r\n    <TextBlock Text=\"{Binding Path=., StringFormat=X4}\" IsEnabled=\"true\"/>\r\n</DataTemplate>\r\n</dataGrid2D:Cell.Template>\r\n    <dataGrid2D:Cell.EditingTemplate>\r\n    <DataTemplate>\r\n        <TextBox Text=\"{Binding Path=., StringFormat=X4}\" />\r\n    </DataTemplate>\r\n</dataGrid2D:Cell.EditingTemplate>\r\n</DataGrid>\r\n```\r\nAlso I'm tried to add an attributes like \"Mode=TwoWay, BindsDirectlyToSource=True, UpdateSourceTrigger=LostFocus, NotifyOnSourceUpdated=True\" In data templates, but it's do nothing effect. Now it's allow me to entering some numbers in cells, but not save to my array. And one detail - everything work good without templates, but I need them."},"comment":{"url":"https://api.github.com/repos/GuOrg/Gu.Wpf.DataGrid2D/issues/comments/390425097","html_url":"https://github.com/GuOrg/Gu.Wpf.DataGrid2D/issues/32#issuecomment-390425097","issue_url":"https://api.github.com/repos/GuOrg/Gu.Wpf.DataGrid2D/issues/32","id":390425097,"user":{"login":"odinsacred","id":17182565,"avatar_url":"https://avatars1.githubusercontent.com/u/17182565?v=4","gravatar_id":"","url":"https://api.github.com/users/odinsacred","html_url":"https://github.com/odinsacred","followers_url":"https://api.github.com/users/odinsacred/followers","following_url":"https://api.github.com/users/odinsacred/following{/other_user}","gists_url":"https://api.github.com/users/odinsacred/gists{/gist_id}","starred_url":"https://api.github.com/users/odinsacred/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odinsacred/subscriptions","organizations_url":"https://api.github.com/users/odinsacred/orgs","repos_url":"https://api.github.com/users/odinsacred/repos","events_url":"https://api.github.com/users/odinsacred/events{/privacy}","received_events_url":"https://api.github.com/users/odinsacred/received_events","type":"User","site_admin":false},"created_at":"2018-05-19T18:51:25Z","updated_at":"2018-05-19T18:51:25Z","author_association":"NONE","body":"And so, should I hope for comlete example, or I must create it by myself? "}}
{"actor":{"display_login":"odinsacred"}}