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

Runtime error 2210: AG_E_INVALID_ARGUMENT

3 Answers 80 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Srinivas
Top achievements
Rank 1
Srinivas asked on 18 Jun 2009, 10:38 PM
Hi,

I am using RadDocking with DocumentHost and Split Container, Pane Group etc. When I load the page first time it works without any problem but if I reload the page by clicking on the Menu option I am getting "Sys.InvalidOperationException: Runtime error 2210 in Control 'Xaml1': AG_E_INVALID_ARGUMENT. I removed the docking code completely and then I can reload the page without any error several times. I am very positive it is the Docking that is causing this issue. Can you please let me know how to handle this error? it is very urgent. I really appreciate your help.
...

<

 

radDock:RadDocking>

 

 

 

<radDock:RadDocking.DocumentHost>

 

 

 

<radDock:RadSplitContainer>

 

 

 

<radDock:RadPaneGroup>

 

 

 

<radDock:RadDocumentPane BorderThickness="0">

 

 

 

<radDock:RadDocumentPane.Content>

 

 

 

<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">

 

 

 

<Grid Background="White">

 

 

 

<Border Background="LightGray" BorderBrush="Gray" BorderThickness="1" Margin="0" Grid.Row="0" Grid.Column="1">

 

 

 

<Grid ShowGridLines="False" >

 

 

 

<Grid.RowDefinitions>

 

 

 

<RowDefinition Height="Auto"></RowDefinition>

 

 

 

<RowDefinition Height="300"></RowDefinition>

 

 

 

<RowDefinition Height="*"></RowDefinition>

 

 

 

</Grid.RowDefinitions>

 

 

 

<Grid.ColumnDefinitions>

 

 

 

<ColumnDefinition Width="Auto"></ColumnDefinition>
.........
.........

 

</

 

radDock:RadDocumentPane.Content>

 

 

 

 

 

 

</radDock:RadDocumentPane>

 

 

 

 

 

 

</radDock:RadPaneGroup>

 

 

 

 

 

 

</radDock:RadSplitContainer>

 

 

 

 

 

 

</radDock:RadDocking.DocumentHost>

 

 

 

 

 

 

<radDock:RadSplitContainer radDock:DockingPanel.InitialSize="200,200" MaxWidth="679"

 

 

 

 

 

InitialPosition="DockedRight" Background="LightGray">

 

 

 

 

 

 

<radDock:RadPaneGroup >

 

 

 

 

 

 

<radDock:RadPane Header="Services" IsPinned="False" CanUserClose="False">

 

 

 

 

 

 

<StackPanel Orientation="Vertical" VerticalAlignment="Top">

 

 

 

 

 

 

<Border Margin="5,10,5,0" Width="175" Height="175" BorderThickness="1" BorderBrush="Black">

 

 

 

 

 

 

<Grid ShowGridLines="False">

 

 

 

 

 

 

<Grid.RowDefinitions>

 

 

 

 

 

 

<RowDefinition Height="Auto"></RowDefinition>

 

 

 

 

 

 

<RowDefinition></RowDefinition>
.......
.......

 

 

 

</radDock:RadPane>

 

 

 

 

 

 

</radDock:RadPaneGroup>

 

 

 

 

 

 

</radDock:RadSplitContainer>

 

 

 

 

 

 

</radDock:RadDocking>

 

3 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 22 Jun 2009, 11:18 AM
Hi Srinivas,

Sorry for the caused inconvenience. Our team could not reproduce the exception you described. I suggest that you download and try the latest internal build's dlls that are available under the Downloads section of your account.

Hope this helps.

All the best,
Kaloyan
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
Srinivas
Top achievements
Rank 1
answered on 29 Jun 2009, 01:01 AM
Hi,

Now I know the problem but not sure how to fix it. In fact, this is related to the Drag-And-Drop functionality. I have defined Dock Panel and inside I placed 4 different <ListBox> elements and each identified with x:Name and on the page_load I registered drop events for each of these list boxes. First time when I click on the Menu option to load the transaction it works fine but next time when I click on the same menu option to reload the transaction I am getting AG_E_INVALID_ARGUMENT. After several days/hours of debug I found out that the x:Name that I specified for the <ListBox> is giving problem. It is possible that these names are already registered once in the memory (when I loaded first time) and next time it is unable to create with the same name. The same issue I found with RadMenu Items, in this case I was trying to disable the Menu option by using the x:Name and again it work OK first time but when I try to reload the page again it gives me the same error. What mechanism I should use to disable RadMenuItems if not using the x:Name?

The only way that I know how to fix is to remove the x:Name property for the ListBox element and RadMenuItem but if I do that I do not know how to register events on those controls. Any help is greatly appreciated. Before loading the page I am removing the contents first and only then loading the page but still the problem occurs.

Any help is appreciated.

Thanks
Srinivas
0
Kaloyan
Telerik team
answered on 01 Jul 2009, 09:07 AM
Hi Srinivas,

This is indeed the expected behavior. It is not possible to apply the same name to two or more elements in one NameScope. Hence, you are getting this error. RadMenu exposes an ItemClick event which you can use to determine the actually clicked MenuItems. Other possible solution is to loop throughout the Items collection property of the RadMenu to find the needed RadMenuItem. Let us know if you need some more information.

Kind regards,
Kaloyan
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.
Tags
Docking
Asked by
Srinivas
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Srinivas
Top achievements
Rank 1
Share this question
or