User (Old forums)MemberMarch 26, 2007 at 12:09 pmPost count: 23064
Is it possible to make data column widths expand out/in to fill up the remaining grid area? It’s typical to have one “main” column, or the last column fill the remaining grid space so it visuall doesn’t look like there is an empty column on the far right. Is this possible in XAML, or do you have to dive into the C# side? We try to keep as much as possible in XAML, so a XAML solution would be optimal. Thanks.
Imported from legacy forums. Posted by Brett (had 12225 views)Xceed SupportMemberMarch 26, 2007 at 1:40 pmPost count: 5658
This feature is currently not possible “out of the box” with the DataGridControl.
However, there might be ways to emulate this by tweaking styles and templates (such as using a DockPanel as the PART_CellsHost for DataRows).
Imported from legacy forums. Posted by Marcus [Xceed] (had 568 views)User (Old forums)MemberMay 9, 2007 at 10:52 amPost count: 23064
Could this be added as a feature request?
The Winforms DataGridView control has an AutoSizeMode property which can be set for each column. The possible values include Fill (which will resize the column to fill the remaining space, DisplayedCells (which resized the columns to fit the data shown in the viewport) and NotSet (which allows for manual column sizing).
This would make the DataGridControl much more useful for us.
Imported from legacy forums. Posted by Todd (had 1030 views)User (Old forums)MemberMay 15, 2007 at 5:00 pmPost count: 23064
was this resolved in the 1.1 release?
Imported from legacy forums. Posted by Adam (had 690 views)Xceed SupportMemberMay 15, 2007 at 5:41 pmPost count: 5658
No, this feature did not make it in version 1.1 .
Imported from legacy forums. Posted by Marcus [Xceed] (had 517 views)User (Old forums)MemberMay 16, 2007 at 11:22 amPost count: 23064
Is there a timeframe for when this fix will be released?
I think this is an important one.
Imported from legacy forums. Posted by Adam (had 522 views)Xceed SupportMemberMay 16, 2007 at 11:38 amPost count: 5658
I do not have the feature map for the next versions yet…
Imported from legacy forums. Posted by Marcus [Xceed] (had 566 views)User (Old forums)MemberAugust 17, 2007 at 7:39 amPost count: 23064
Any News on this aspect ?
Imported from legacy forums. Posted by Desmond (had 839 views)User (Old forums)MemberAugust 17, 2007 at 8:34 amPost count: 23064
You may try to use the LastChildFill property of the DockPanel to create a Controltemplate in which you put your items.
The last one in the DockPanel will fill all the available space if LastChildFill=True.
Imported from legacy forums. Posted by valentin (had 559 views)User (Old forums)MemberOctober 29, 2007 at 1:37 pmPost count: 23064
Can anyone give a code snippet for filling the the available space with the last column? Please help. I am setting the datasource at runtime. So how do i ensure that the last coulm fills the grid.
Thanks in advance.
Imported from legacy forums. Posted by Shwetha (had 578 views)User (Old forums)MemberFebruary 22, 2008 at 6:58 amPost count: 23064
Now I downloaded version 1.4 and seems there are still no solution for this(I meen filling available space with the last column)? Rewriting DataRow template seems not good idea because currently used FixedCellPanel as PART_CellsHost seems have some functionality for printing.
Any comments on this topic form Xceed team? Thanks.
Imported from legacy forums. Posted by Saulius (had 820 views)User (Old forums)MemberFebruary 22, 2008 at 8:37 amPost count: 23064
Just my 2 cents: I had a similar problem and my quick and (sadly:-) dirty solution was just to handle the SizeChanged event of the datagrid and expand columns as required. E.g. I had to expand the rightmost 3 columns distributing the “free” space among them proportionally (in this sample 40%,20% and 40% respectively), so in the SizeChanged handler I put code like this:
double dColWidth = _dgResults.VisibleColumns.Sum(c => c.Width);
double dAvailWidth = _dgResults.ActualWidth – dColWidth;
if (dAvailWidth > 0)
_dgResults.VisibleColumns[_dgResults.VisibleColumns.Count – 3].Width += ((dAvailWidth – 50) * 0.4);
_dgResults.VisibleColumns[_dgResults.VisibleColumns.Count – 2].Width += ((dAvailWidth – 50) * 0.2);
_dgResults.VisibleColumns[_dgResults.VisibleColumns.Count – 1].Width += ((dAvailWidth – 50) * 0.4);
Of course that’s just a workaround. For me too many important features of the “old” WinForms DataGridView should be taken into account for the enhancement of this promising WPF grid!
Imported from legacy forums. Posted by Mathetes (had 1349 views)User (Old forums)MemberFebruary 22, 2008 at 12:24 pmPost count: 23064
I hope this feature is part of v2.0 and all the work hasnt gone into the useless ipod coverflow feature…. lets get the basic sorted first!
Imported from legacy forums. Posted by MattCheshire (had 947 views)Odi [Xceed]SpectatorFebruary 22, 2008 at 2:44 pmPost count: 426
There are a lot of things in the pipeline. The feature mentionned in this thread didn’t make it into v2.0, but will probably be dealt with for v.next.
We have a lot of development and design muscle on the Xceed DataGrid for WPF team, so we can work in parallel on core improvements (such as this column feature) as well as several other features such as 3D views. That said, we can and do delay items (indeed, the 3D views were the victim this time) to ensure each new version ships with an increasingly solid foundation of core features.
Thanks for the comment.
Imported from legacy forums. Posted by Odi [Xceed] (had 640 views)User (Old forums)MemberApril 9, 2008 at 4:24 pmPost count: 23064
My boss told me today that I should have a look at the infragistic datagrid. Just because of this missing “core” feature…
Our customer really doesn´t like the appearance of the grid without the last column stretching. And I don not either.
It seems a little bit odd to me, that the grid looks kind of “incomplete” if you want to use it as a standard grid, but supports fancy things like 3D Views…
However, I like the grid and hope the infragistics one will have other shortcomings!
Imported from legacy forums. Posted by Christian (had 657 views)
- You must be logged in to reply to this topic.