문제

In my DataGrid if I have the following binding I get the User_ID no problem. Each row is a User record. How do I change this to bind the actual User Object? So I can send it into my converter.

{Binding Path=DataContext.User_ID, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"
도움이 되었습니까?

해결책

Try to remove .User_ID from binding path :

{Binding Path=DataContext, RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}"

다른 팁

Remove the 'path' from the binding as follows:

{Binding RelativeSource={RelativeSource AncestorType={x:Type DataGridRow}}}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top