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

GridView in UserControl becomes uneditable

1 Answer 26 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Phillip
Top achievements
Rank 1
Phillip asked on 29 Apr 2010, 08:57 PM
Hi,

I have had a RadGridView generated at runtime in my application for a while, and have now moved its immediate parent into a UserControl XAML file in order to allow designers etc to modify the layout etc. The UserControl simply has a Grid layout element and a bunch of buttons specific to my application.

Now I've parented the RadGridView control into this UserControl (again at runtime) none of the grid editors work and I don't get a call to my custom columns CreateCellEditElement override. During the overridden call to CreateCellElement in my column, the base.CreateCellElement call returns a Null value, which (with the aid of Reflector) seems to mean that the CreateCellEditElement will not be called.

Has anyone any idea whats wrong here ? We have had this stuff working for some time, but the inclusion of the UserControl in the stack seems to have broken it. Note that in our application almost everything is constructed in code, and we only use XAML for layout so there isn't much XAML to post as an example. But here is my usercontrol definition

<!-- Standard data maintenance panel --> 
<iSIMS:iSIMSUserControl x:Class="iSIMS.Silverlight.Client.DataMaintenanceControl" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"   
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"    
    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"    
    xmlns:iSIMS="clr-namespace:iSIMS.Silverlight.Client">  
 
    <Grid x:Name="navigationLayoutGrid" 
          Width="Auto" 
          Height="Auto">  
          
        <Grid.ColumnDefinitions> 
            <ColumnDefinition Width="1*" x:Name="dataLayoutColumn"/>  
            <ColumnDefinition Width="Auto" x:Name="navigationContainer" /> 
        </Grid.ColumnDefinitions> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="1*" /> 
        </Grid.RowDefinitions> 
          
        <telerikNavigation:RadTabControl   
            x:Name="navigationTabControl"   
            VerticalAlignment="Stretch"   
            HorizontalAlignment="Stretch"   
            TabStripPlacement="Right" 
            Grid.Column="1" 
            Grid.Row="0">  
            <!-- Actual tabs are inserted in here at runtime--> 
        </telerikNavigation:RadTabControl> 
          
        <ScrollViewer   
            Grid.Column="0" 
            Grid.Row="0" 
            x:Name="scrollViewer"   
            VerticalContentAlignment="Stretch"   
            HorizontalContentAlignment="Stretch"   
            HorizontalScrollBarVisibility="Disabled"   
            VerticalScrollBarVisibility="Visible">  
            <!-- Content is dynamically assigned at runtime and the RadGridView is constructed in code and injected at runtime into the scrollviewer content --> 
        </ScrollViewer> 
    </Grid> 
</iSIMS:iSIMSUserControl> 


Phillip

1 Answer, 1 is accepted

Sort by
0
Phillip
Top achievements
Rank 1
answered on 30 Apr 2010, 09:25 AM
This is solved now - it had no relationship with User Controls but another binding issue.
Tags
GridView
Asked by
Phillip
Top achievements
Rank 1
Answers by
Phillip
Top achievements
Rank 1
Share this question
or