User (Old forums)MemberApril 27, 2007 at 9:38 amPost count: 23064
I’ve run into a lot of problems with a databound grid not respecting the normal WPF behvaiors for layout. For instance, a small, two-column grid with HorizontalAlignment set to Left should only be taking up a couple of inches based on the data. However, even with absolutely no hard-coded widths anywhere, it defaults to half of the screen. Additionally, the vertical sizing seems to display some of the same issues based on the Grid’s scroll-bar never becoming enabled (and it allowing me to select right on down the grid, off the page).
1 – Is this a known (and real) issue?
2 – Is this going to improve in 1.1?
3 – Is there any concise guidance on how to set the various attributes for an effective grid layout? Assume that I’d prefer not specify any numerical widths.
Imported from legacy forums. Posted by Eric (had 4777 views)Xceed SupportMemberApril 27, 2007 at 9:42 amPost count: 5658
I’m going to take a look into this issue… In the mean time, can you share a little bit of your Grid Layouting code, in case it helps me nail the problem down.
Imported from legacy forums. Posted by Marcus [Xceed] (had 222 views)User (Old forums)MemberApril 27, 2007 at 1:24 pmPost count: 23064
Our Xceed grid’s on a user control, which is then hosted in a grid on another user control. The hosting site is as follows. I’d like to be able to replace with Width=250 with Width=Auto
<ColumnDefinition Width=”250″ />
<rics:StoreSelectionView Grid.Column=”0″ x:Name=”_selectionView”/>
<GridSplitter> <!– … ->
The User control is effectively as follows. I’d also like to remove the Width=50 from the code column, but I can’t until auto-sizing columns works (1.1???)
<!– couple of other controls here, with no sizing set –>
Imported from legacy forums. Posted by Eric (had 428 views)Xceed SupportMemberApril 27, 2007 at 3:02 pmPost count: 5658
Thank you… we’ll take a look at this and let you know about our findings…
Imported from legacy forums. Posted by Marcus [Xceed] (had 177 views)User (Old forums)MemberApril 30, 2007 at 10:42 amPost count: 23064
I’ve got some more interesting behaviors you may be interested in surrounding this issue, but because they involve sharing screenshots and other things we’d rather not publicly share, could we continue this thread by email?
erwilleke at csi-rics.com
Imported from legacy forums. Posted by Eric (had 277 views)Xceed SupportMemberApril 30, 2007 at 1:21 pmPost count: 5658Xceed SupportMemberApril 30, 2007 at 3:10 pmPost count: 5658
I saw your screenshots and noticed that the DataGridControl was not sizing itself to fit the size of your Tab control…
I then took a minute to observe the XAML code for layouting the DataGridControl and noticed you placed it inside a StackPanel…
As a Default behavior, a stack panel will layout its childs with infinity as size constraint… unless a restrictive parameter is set on the StackPanel… Therefore, the DataGridControl will take as much space as required to layout all its childs ( you then forfeit the UI Virtualization).
This is symptomatic by seing that the bottom part of the horizontal scrollbar is not visible.
To solve the strange scrolling issue, you can try removing the stackpanel. Or if you need to layout other elements along with the grid, use another kind of panel (grid, dockpanel)…
When I have a second, i’ll take a look at your other issue.
Imported from legacy forums. Posted by Marcus [Xceed] (had 260 views)User (Old forums)MemberApril 30, 2007 at 4:28 pmPost count: 23064
Actually, Marcus, that fixes all the scrolling issues I had… I’d never realized that StackPanel blocked the virtualization behavior by not being constrained… I replaced the StackDanel with a DockPanel with the other stuff in the view Docked to Top and the datagrid set as the last child with LastChildFill set to true.
Other question: Is column autofitting coming in any of the upcoming releases?
Imported from legacy forums. Posted by Eric (had 6261 views)
- You must be logged in to reply to this topic.