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

Issue with relative column width

1 Answer 106 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paresh Sen
Top achievements
Rank 1
Paresh Sen asked on 22 Feb 2010, 08:31 AM

Hi,

I am trying to achieve relative column width so that Grid is properly dislayed in different resolutions.

On using Width="0.1*"  in the below column getting error.

 

 

 

<telerik:GridViewDataColumn HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}"

 

 

 

                                             TextAlignment="Center" 
                                               HeaderTextAlignment
="Center" 
                                               
Width=".1*" 
                                               UniqueName
="ID"

 

 

 

 

                                              Header="ContractID" 
                                               
DataMemberBinding="{Binding ID}">

 

 

 

 

    <i:Interaction.Behaviors> <common:ClosePopupOnApplyFilterBehavior /> </i:Interaction.Behaviors>

 

 

 

 

</telerik:GridViewDataColumn>

 

 

 

 

 

Message: System.InvalidOperationException: UIElement.Measure(availableSize) cannot be called with NaN values in availableSize.
   at System.Windows.UIElement.Measure(Size availableSize)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureChild(UIElement child, Size constraint)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChild(IItemContainerGenerator generator, Size constraint, GridViewColumn column, Int32& childIndex, Size& childSize)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.GenerateChild(IItemContainerGenerator generator, Size constraint, GridViewColumn column, IDisposable& generatorState, Int32& childIndex, Size& childSize)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.DetermineRealizedColumnsBlockList(Size constraint)
   at Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)      



Any pointers will be helpful.

Thanks,
Paresh

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 23 Feb 2010, 08:58 AM
Hello Paresh,

I've just tried this however everything worked fine on my end - you can check the attached project for reference.

Best wishes,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Paresh Sen
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or