I have several tabitems, each of them have a DataGrid in it, and I set DataGrid's attribute "AutoGenerateColumns" to false. The TabControl is embraced by a ScrollViewer, Here is the question, every DataGrid in every TabItem has an empty column in the end. I googled around, but get few things useful. Here's the code structure.
<ScrollViewer>
<TabControl>
<TabItem>
<DataGrid AutoGenerateColumns="False">
</DataGrid>
</TabItem>
</TabControl>
</ScrollViewer>
Can anyone help me ? Thanks a lot.
Update
OK, actually the situation is, I have several TabItems in a TabControl, but the width of TabControl is limited, so I gonna use ScrollViewer to "scroll" TabItems, so I can see these TabItems clearly, and that's the reason why it results in the current problem. I think, the ScrollViewer effectes the TabItems total width, and indirectly, effectes the width of DataGrid in each TabItem, so the sum width of columns in DataGrid less than the width of DataGrid, therefore, there's an empty column in the right side.
I try to add another ScrollViewer around DataGrid, but failed, there's still a blank part in the right side.