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

ColumnsWidthMode="Fill" Exception Error Message

6 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Glen
Top achievements
Rank 1
Glen asked on 13 Aug 2009, 11:44 PM
Hi,

I have just download build 2009.2 813 which fixed an issue we were having, however it has broken something else.

If a Grid has no records in its item source and the ColumnsWidthMode is set to FIll I get the following exception:

Message="'-3' is not a valid value for property 'ViewportSize'."

The xaml code for the Grid is:

<telerik:RadGridView x:Name="radGridViewNotes"   
                     AutoGenerateColumns="False"   
                     ColumnsWidthMode="Fill"   
                     Grid.Row="2"   
                     IsReadOnly="True" 
                    
DataLoaded="RadGridViewNotes_DataLoaded" 
                     telerik:StyleManager.Theme="Office_Black">  
    <telerik:RadGridView.Columns> 
        <telerik:GridViewDataColumn Header="Subject" DataMemberPath="Subject" /> 
        <telerik:GridViewDataColumn Header="Creation Date" DataMemberPath="DateAdded" /> 
    </telerik:RadGridView.Columns> 
</telerik:RadGridView> 

If I change the ColumnsWidthMode to "None" or "Auto" it works fine.

Regards,
Glen

6 Answers, 1 is accepted

Sort by
0
Missing User
answered on 14 Aug 2009, 07:30 AM

Hello Glen,

I have prepared a sample application and tried to reproduce the exception error message that you have described, but unfortunately I was not able to.
Can you please examine the project that I have attached and tell me how to reproduce the behavior that you are experiencing on your end.

Maybe I am doing something differently than you and that is why I cannot reproduce the behavior. Or maybe you can configure my sample project so that it behaves like your project and attach it back along with the instructions on how to make it happen.

Best wishes,

Anastasia
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
Thomas
Top achievements
Rank 1
answered on 14 Aug 2009, 01:12 PM
I have the same problem:

Window property:
  SizeToContent="WidthAndHeight"

The radgridview is wrapped in a scrollviewer.

All the best,
Thomas

0
Missing User
answered on 17 Aug 2009, 03:34 PM

Hello Thomas,

We have already fixed a problem related to the ViewportSize (similar to the described one) which we had reproduced when the following preconditions were available:

1. Window's SizeToContent="WidthAndHeight"
2. RadGridView is wrapped in ScrollViewer with HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" properties set.
3. RadGridView is bound to an empty itemsource
4. RadGridView's property ColumnsWidthMode =Fill

I have updated your Telerik points for helping us identify  this issue.

The fix will be available in our latest internal build(this Friday). But we still cannot be sure if this fix will fix the issues you have. That's why it would be best if it is possible to send us a sample project where we can reproduce the problem.


Greetings,

Anastasia
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
Thomas
Top achievements
Rank 1
answered on 26 Aug 2009, 03:39 PM
Hello,

Works fine with latest build.
Thanks for your quick response and for the points.

Thomas.
0
Justin Manjooran
Top achievements
Rank 1
answered on 07 Dec 2010, 07:50 AM
I am getting the Error

The property 'ColumnsWidthMode' was not found in type 'RadGridView'.

I am using the  Telerik.Windows.Controls.GridView Version  2010.3.1110.40
0
Vanya Pavlova
Telerik team
answered on 07 Dec 2010, 10:06 AM
Hello Justin,


You get this error because this property no longer exists. In order to achieve the same effect set ColumnWidth property of RadGridView to star:

<telerik:RadGridView x:Name="radGridView1" ColumnWidth="*" ....../>


Regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
Glen
Top achievements
Rank 1
Answers by
Missing User
Thomas
Top achievements
Rank 1
Justin Manjooran
Top achievements
Rank 1
Vanya Pavlova
Telerik team
Share this question
or