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

Error undocking Grid container in raddock

1 Answer 21 Views
GridView
This is a migrated thread and some comments may be shown as answers.
steve white
Top achievements
Rank 1
steve white asked on 19 Apr 2010, 11:36 PM
I'm having an issue when I try to undock the grids container from the rad dock, if I add a group to the grid by dragging a column header first its fine and then it will break if I work in another panel then go back to the one with the grid and try to undock.

It appears to be losing reference to the records or something, I get these errors

There is no source code available for the current location then I have this error description
This row has been removed from a table and does not have any data.  BeginEdit() will allow creation of new data in this row.

I'm guessing I need to change the way I binding up my data, but I'm unsure what I should change. It all works fine as long as I dont try to undock the grids pane.

thanks for any help you can provide.

steve

<Window x:Class="Window1" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Window1" Height="300" Width="300"  
        xmlns:radDock="http://schemas.telerik.com/2008/xaml/presentation" 
        xmlns:Local ="clr-namespace:controls" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
    <Grid> 
        <radDock:RadDocking x:Name="radDocking1"  HasDocumentHost="False"
             
                      
                <radDock:RadSplitContainer radDock:DockingPanel.InitialSize="150,150" MaxWidth="600"  
                    Name="LeftContainer" InitialPosition="DockedLeft"   > 
                     
                <radDock:RadPaneGroup x:Name="Group1"
                   
                    <radDock:RadPane x:Name="Pane2" Header="Sales Grid"
                        
                        <telerik:RadGridView  Name="RadGridView1"  ItemsSource="{Binding Sales}"
                           
                        </telerik:RadGridView> 
 
                    </radDock:RadPane> 
                </radDock:RadPaneGroup> 
            </radDock:RadSplitContainer> 
 
            <radDock:RadSplitContainer radDock:DockingPanel.InitialSize="200,200" MaxWidth="679" 
                    x:Name="RightContainer" InitialPosition="DockedRight" > 
                <radDock:RadPaneGroup x:Name="Group2"
                    
                    <radDock:RadPane x:Name="Pane4" Header="Properties"
                        
                    </radDock:RadPane> 
                </radDock:RadPaneGroup> 
            </radDock:RadSplitContainer> 
 
           
        </radDock:RadDocking> 
 
    </Grid> 
</Window> 
 
Imports System.Data 
 
Class Window1 
 
    Private Shared tacust As New DataSet1TableAdapters.SalesSummaryTableAdapter 
    Private Shared dscust As New DataSet1 
    Private Shared m_sales As DataTable 
    Public Shared ReadOnly Property Sales() As DataTable 
        Get 
            Return m_sales 
        End Get 
    End Property 
 
    Private Sub RadGridView1_Loaded(ByVal sender As ObjectByVal e As System.Windows.RoutedEventArgs) Handles RadGridView1.Loaded 
        tacust.Fill(dscust.SalesSummary) 
        m_sales = dscust.Tables("SalesSummary"
 
        RadGridView1.ItemsSource = m_sales 
    End Sub 
End Class 
 
 
 

1 Answer, 1 is accepted

Sort by
0
steve white
Top achievements
Rank 1
answered on 21 Apr 2010, 05:14 PM
I think I found the answer to my problem. I changed the gridview_load procedure to initialize, it was apparently trying to run it every-time I undocked which was producing errors.

steve
Tags
GridView
Asked by
steve white
Top achievements
Rank 1
Answers by
steve white
Top achievements
Rank 1
Share this question
or