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

[Solved] using RowDetailsTemplate throws OutOfMemoryException when loading grid with Silverlight 3

8 Answers 131 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.
Asaf Merschon
Top achievements
Rank 1
Asaf Merschon asked on 02 Aug 2009, 09:18 AM
Hello all,

I am building a GridView with 20 columns showing some 150 rows.  Since this is quite a wide table, and I want the user to be able to edit the table easily, I decided to use a RowDetailsTemplate that will actually be a form with all the edditable data from the selected row.  I tried doing this like in the "Row Details" sample that is installed with the 2009 Q2 release (i.e. with the details view in a separate user control).  The problem is that when I do that, the grid trows me an OutOfMemoryException.  If on the other hand, I put the template directly in the grid control's resources, it works just fine.

Here are a few lines of code to show what I'm doing:

In the Grid's resources:
 
<Grid.Resources>   
     <DataTemplate x:Key="PropertySetDetails">   
         <local:PropertySetDetails />   
     </DataTemplate>   
</Grid.Resources> 

In the GridView's definition:
<telerikGridView:RadGridView x:Name="propertySetGridView" Grid.Row="2"      
                             CanUserInsertRows="true" AutoGenerateColumns="False"      
                             RowDetailsTemplate="{StaticResource PropertySetDetails}"      
                             RowDetailsVisibilityMode="VisibleWhenSelected"

In the user control file for the details view (in the same silverlight project) I have a grid with some controls:

 

<UserControl x:Class="MyProject.PropertySetDetails"   
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">   
    <Grid x:Name="DetailsLayoutRoot">   
        <Grid>   
            <Grid.ColumnDefinitions>   
                ...  
            </Grid.ColumnDefinitions>   
            <Grid.RowDefinitions>   
                ...          
            </Grid.RowDefinitions>   
            ...          
            <TextBlock Text="Name" Grid.Column="1" Grid.Row="1"/>   
            <TextBox x:Name="nameTextBox" Grid.Column="2" Grid.Row="1" Text="{Binding Name}" /> 
        </Grid>   
    </Grid>   
</UserControl> 

 

Now this gives me the exception.  Like I said, if I take out the grid markup from the separate file and put it the GridView's file (in the resources section), it works!
What am I doing wrong?  I am new to Silverlight (and C#) so please take that into consideration in your reply.

Thanks in advance,
AM.

8 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 03 Aug 2009, 12:27 PM
Hello Asaf Merschon,

Please, see my answer to your support ticket. Sorry for the double post there -- something went wrong.

All the best,
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
Krlos
Top achievements
Rank 1
answered on 07 Oct 2009, 02:32 PM
I hace the same problem, how do you solved it?
0
Vlad
Telerik team
answered on 07 Oct 2009, 02:44 PM
Hi Krlos,

The problem in this thread was actually source safe encoding issue.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Krlos
Top achievements
Rank 1
answered on 08 Oct 2009, 07:40 PM
Hi Vlad!

Thanks for yor reply, I found that my problem is that b3 crashes when applying a theme to the gridview, do you know when it would be fixed?

Thanks
0
Vlad
Telerik team
answered on 09 Oct 2009, 05:51 AM
Hi Krlos,

Can you provide more info about you version? If you can send us small example where we can reproduce the problem we will gladly provide more info (or fix if necessary) about this issue.

Sincerely yours,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Krlos
Top achievements
Rank 1
answered on 09 Oct 2009, 01:17 PM

<gridView:RadGridView x:Name="grd" telerik:StyleManager.Theme="Office_Blue" /> 

 

 

Beta Versión  : http://demos.telerik.com/silverlight/beta/#GridView/Totals

 

 

0
Kalin Milanov
Telerik team
answered on 09 Oct 2009, 03:32 PM
Hi Krlos,

Office_Blue theme for RadGridView is not working properly with some of our controls (RadGridView being one of them). Are you getting this exception when using the Office_Black theme?

All the best,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Krlos
Top achievements
Rank 1
answered on 09 Oct 2009, 08:27 PM
Thanks Vlad, that was the theme.
Tags
GridView
Asked by
Asaf Merschon
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Krlos
Top achievements
Rank 1
Vlad
Telerik team
Kalin Milanov
Telerik team
Share this question
or