Reorder issue with Multiple grid

6 posts, 0 answers
  1. Pradnya
    Pradnya avatar
    31 posts
    Member since:
    Aug 2011

    Posted 21 May 2012 Link to this post

    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-

  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 23 May 2012 Link to this post

    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 >>

  3. Pradnya
    Pradnya avatar
    31 posts
    Member since:
    Aug 2011

    Posted 23 May 2012 Link to this post

    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-

  4. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 28 May 2012 Link to this post

    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 >>

  5. Pradnya
    Pradnya avatar
    31 posts
    Member since:
    Aug 2011

    Posted 28 May 2012 Link to this post

    what about full orange line that where we can add the row?

    Which is not visible using your project.

    Thanks-
  6. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 28 May 2012 Link to this post

    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 >>

Back to Top