This is a migrated thread and some comments may be shown as answers.

RadGridView ColumnsWidthMode="Fill" Issue

3 Answers 177 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brad
Top achievements
Rank 1
Brad asked on 30 Apr 2009, 08:35 PM

 Hi,

I am using version  2009.1.312.35.

The RadGridView is wrapped in a StackPanel which is in a column of a Grid with a splitter.

In the following code, The last column does not take up the remaining space. Are there additional tricks to get it to work? I read this post: http://www.telerik.com/community/forums/wpf/gridview/documentation-is-frustrating.aspx, and I think I did what it suggests, but it doesn't work.

Also, will the column resize when the splitter is moved?

 

<telerik:RadGridView   
HorizontalAlignment="Stretch"   
x:Name="uxLibraryView"   
MultipleSelect="True"   
AutoGenerateColumns="False"   
ColumnsWidthMode="Fill"   
AllowDrop="False"   
ShowGroupPanel="False"   
ItemsSource="{Binding Path=LibraryMembers,Diagnostics:PresentationTraceSources.TraceLevel=High}"   
IsFilteringAllowed="False"   
telerik:GridViewCell.EditEnded="uxLibraryView_EditEnded"   
SelectionChanged="uxLibraryView_SelectionChanged">   
 
<telerik:RadGridView.Resources>   
...Context Menu Stuff ...  
</telerik:RadGridView.Resources>   
 
<telerik:RadGridView.Columns>   
    <telerik:GridViewDataColumn HeaderText="{x:Static properties:Resources.Common_Label_Type}"   
        IsReadOnly="True"   
        UniqueName="LibraryContentType"   
        Width="23">   
            <telerik:GridViewColumn.CellStyle>   
 
            <Style TargetType="{x:Type telerik:GridViewCell}">   
                <Setter Property="Template">   
                    <Setter.Value>   
                        <ControlTemplate TargetType="{x:Type telerik:GridViewCell}">   
                            <Image Stretch="None" Width="16" Height="16"   
                                        Source="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Content, Converter = {StaticResource ContentTypeToImageConverter}}"   
                                         Margin="2,0,5,0"/>   
                        </ControlTemplate>   
                    </Setter.Value>   
                </Setter>   
            </Style>   
        </telerik:GridViewColumn.CellStyle>   
    </telerik:GridViewDataColumn>   
 
    <telerik:GridViewDataColumn HeaderText="{x:Static properties:Resources.Common_Label_Name}"   
            UniqueName="Name"   
            Width="*"    />   
    </telerik:RadGridView.Columns> 
</telerik:RadGridView> 

 

 

 

Thank you

 

 

3 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 01 May 2009, 09:50 AM
Hello Brad,

I have tried to reproduce the problem with the latest version (2009.1.413.35) but to no avail. Everything worked out fine. I took your project and hard-coded some data bindings to make it compile, but I have preserved the layout that you supplied. Can you please take a look at the project I have attached and verify whether it behaves correctly on your side or not. Drag the splitter to the left and right and see whether the second grid column (Subject) fills the entire space it can. Remember that this project is using the latest binaries (2009.1.413.35) available and maybe that is making the difference.

If that project cannot help you, could you please send us a sample (probably a dummy stub) project that reproduces the behavior that you experience and can be successfully compiled on our end (i.e. you can hard-code data in some way). Hopefully, we will be able to resolve the issue with the help of that project.

We are looking forward to hearing from you.

Sincerely yours,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Brad
Top achievements
Rank 1
answered on 01 May 2009, 05:32 PM
Were you able to try it using the prior build?  I am at the end of the project cycle and modifying the layout.  I don't know if we want to introduce a new component at this point....unless you believe there are no critical issues between 2009.1.312.35 and 2009.1.413.35 that could break anything.
0
Milan
Telerik team
answered on 05 May 2009, 08:38 AM
Hi Brad,

There are some changes since 2009.1.312.35 and I cannot guaranty that everything will work without modifications, but in my opinion you should at least try to updgrade to the latest version since we have introduces new features and fixed many issues. Here you can find more info about the changed that were introduces since 312: http://www.telerik.com/products/wpf/whats-new/release-history/q1-2009-sp1-version-2009-1-413.aspx


Regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Brad
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Brad
Top achievements
Rank 1
Milan
Telerik team
Share this question
or