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

(Error) Layout measurement override of element ...

2 Answers 326 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 03 Jul 2011, 12:12 AM
When adding a new DataFormComboBoxField
to my DataForm i get an error:

System.InvalidOperationException

Layout measurement override of element 'Microsoft.Windows.Design.Platform.SilverlightViewProducer+SilverlightContentHost' should not return PositiveInfinity as its DesiredSize, even if Infinity is passed in as available size.


This is in my ReadOnlyTemplate
I have the same element in my EditTemplate

The app works just fine but i cannot see the design as long as the elements is in there.

Here is the code:

<telerik:RadDataForm.ReadOnlyTemplate>
                            <DataTemplate>
                                <StackPanel>
                                    <telerik:DataFormDataField DataMemberBinding="{Binding Details.Name,Mode=OneTime}" Label="Client Name:" IsEnabled="False" />
                                    <telerik:DataFormDataField DataMemberBinding="{Binding Details.Description,Mode=OneTime}" Label="Description:" IsEnabled="False"/>
                                    <telerik:DataFormDataField DataMemberBinding="{Binding WebSite,Mode=OneTime}" Label="Web Site:" IsEnabled="False"/>
                                    <telerik:DataFormDataField DataMemberBinding="{Binding Details.Notes,Mode=OneTime}" Label="Notes:" IsEnabled="False" />
                                    <telerik:DataFormComboBoxField DataMemberBinding="{Binding VisibilityTypeId,Mode=TwoWay}" Label="Visibility:" DisplayMemberPath="Name" SelectedValuePath="Id" ItemsSource="{Binding Source={StaticResource Clients_VM}, Path=VisibilityTypes}" IsEnabled="False"/>
                                    <telerik:DataFormDataField DataMemberBinding="{Binding Core.StateFlag,Mode=OneTime}" Label="State Flag:" IsEnabled="False"/>
                                    <telerik:DataFormDataField DataMemberBinding="{Binding Core.Position,Mode=OneTime}" Label="Position:" IsEnabled="False"/>
                                    <telerik:DataFormComboBoxField DataMemberBinding="{Binding UserId,Mode=TwoWay}" Label="Owner:" DisplayMemberPath="UserGuid" SelectedValuePath="Id" ItemsSource="{Binding Source={StaticResource Clients_VM}, Path=Users}" IsEnabled="False"/>
                                </StackPanel>
                            </DataTemplate>
                        </telerik:RadDataForm.ReadOnlyTemplate>


it's the last element in the list.

2 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 04 Jul 2011, 07:15 AM
Hello,

 Can you change StackPanel in your DataTemplate to Grid to see what will be the result? 

Kind regards,
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
0
Andrew
Top achievements
Rank 1
answered on 04 Jul 2011, 09:04 PM

Thanks Vlad.

I am afraid i was a bit impatient and changed the whole design completely to avoid the error.

Now I am using the RadDataForm inside a RadGridView, using it this way does not give me the error.

I am most likely to use the DataForm the other way quite soon and if I encounter the error again I will try it with a grid rather than a stackpanel.

Tags
DataForm
Asked by
Andrew
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or