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

Reorder issue with Multiple grid

5 Answers 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pradnya
Top achievements
Rank 1
Pradnya asked on 21 May 2012, 02:23 PM
Hi,

I have two grid view on same page I have Implemented reordering functionality to both grid uisng RowReorderBehavior,GridViewDataControlExtensions, BeginningDragEventArgs etc classes but In that scenario I am getting following error 
Message : "Value does not fall within the expected range."

StackTrace:

   at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
   at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value)
   at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value)
   at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value)
   at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value)
   at System.Windows.PresentationFrameworkCollection`1.Add(T value)
   at Configuration.Reorder.RowReorderBehavior.AttachDropPositionFeedback()

Class Name: RowReorderBehavior
Method Name: AttachDropPositionFeedback

It works for single gridview but it throw an exception when I implement reordering for more than one gridview

Please help me to resolve this issue.

Thanks-

5 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 23 May 2012, 08:33 AM
Hi,

 I have tested the row reordering between two GridViews using the source code at this online demo. My test project does not throw such an exception. I do not see the "AttachDropPositionFeedback" method name though and I am not sure what the problem in your implementation would be.

Would you please share more details on your exact implementation?

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Pradnya
Top achievements
Rank 1
answered on 23 May 2012, 10:47 AM
Hi Didie,

Thank you for ur reply

I am doing reording on two separate grid not a row reordering between two GridViews

First Grid:

 <telerik:RadGridView x:Name="teamembersGridView" RowIndicatorVisibility="Collapsed" toolkit:DockPanel.Dock="Top" Margin="0,7,0,0" ShowGroupPanel="False"
                                     ColumnWidth="*" CanUserFreezeColumns="False"
                                     AutoGenerateColumns="False" AlternateRowBackground="WhiteSmoke" AlternationCount="2"
                                     ItemsSource="{Binding Path=Team.FlexTeam.TeamMemberCollection, Mode=TwoWay}"
                                     CanUserResizeColumns="False" telerikDragDrop:RadDragAndDropManager.AllowDrop="True"
                                     VerticalAlignment="Top" HorizontalAlignment="Stretch">
                    <i:Interaction.Behaviors>
                        <example:RowReorderBehavior x:Name="memberReorderBehavior" DragCueItemTemplate="{StaticResource DraggedItemTemplate}"
             DragCueTooltipContentTemplate="{StaticResource DraggedItemTemplate}"/>
                    </i:Interaction.Behaviors>

                    <telerik:RadGridView.RowStyle>
                        <Style TargetType="telerik:GridViewRow">
                            <Setter Property="telerik:RadDragAndDropManager.AllowDrag" Value="True" />
                        </Style>
                    </telerik:RadGridView.RowStyle>
</telerik:RadGridView>

Second Grid:

 <telerik:RadGridView x:Name="managerGridView" RowIndicatorVisibility="Collapsed"  Margin="0,-1,0,0" ShowGroupPanel="False"
                                     ColumnWidth="*" telerikDragDrop:RadDragAndDropManager.AllowDrop="True"
                                     AutoGenerateColumns="False" AlternateRowBackground="WhiteSmoke" AlternationCount="2"
                                     ItemsSource="{Binding Path=Team.FlexTeam.TeamManagerCollection, Mode=TwoWay}"
                                     CanUserResizeColumns="False" BorderThickness="0"
                                     VerticalAlignment="Top" HorizontalAlignment="Stretch">
                    <i:Interaction.Behaviors>
                        <example:RowReorderBehavior x:Name="ReorderBehavior" DragCueItemTemplate="{StaticResource DraggedItemTemplate}"
             DragCueTooltipContentTemplate="{StaticResource DraggedItemTemplate}" />
                    </i:Interaction.Behaviors>

                    <telerik:RadGridView.RowStyle>
                        <Style TargetType="telerik:GridViewRow">
                            <Setter Property="telerik:RadDragAndDropManager.AllowDrag" Value="True" />
                        </Style>
                    </telerik:RadGridView.RowStyle>

</telerik:RadGridView>

Please refer above xaml for reproduce above issue

Thanks-

0
Dimitrina
Telerik team
answered on 28 May 2012, 09:55 AM
Hello Pradnya,

 I have attached a sample project showing row reorder in two grids. Please check how it works.

Greetings,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Pradnya
Top achievements
Rank 1
answered on 28 May 2012, 11:02 AM
what about full orange line that where we can add the row?

Which is not visible using your project.

Thanks-
0
Dimitrina
Telerik team
answered on 28 May 2012, 12:40 PM
Hi,

 I am not sure what is the orange line that you talk about. May you please clarify?

Regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Pradnya
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Pradnya
Top achievements
Rank 1
Share this question
or