Drag and Drop Not working alternate rows

5 posts, 0 answers
  1. Kennet
    Kennet avatar
    104 posts
    Member since:
    Jun 2009

    Posted 22 Aug 2013 Link to this post

    Hi!

    If I use alternate rows the drag drop don't work on the aleternated rows. So so every other row drag drop don't work.

    I set Alternaterows like this in code and I use DragDropManager:

    dg1.AlternateRowBackground = new SolidColorBrush(Color.FromArgb(255, 184, 186, 188));
    dg1.AlternationCount = 2;

    Please help me out here.
  2. Kennet
    Kennet avatar
    104 posts
    Member since:
    Jun 2009

    Posted 22 Aug 2013 Link to this post

    Opps, I solved it by using AlternateRowStyle and a setter for dragdrop manager..
  3. DevCraft banner
  4. srecov
    srecov avatar
    7 posts
    Member since:
    Jul 2013

    Posted 23 Aug 2013 Link to this post

    Hi, can you give an example, regards Srečo
  5. Kennet
    Kennet avatar
    104 posts
    Member since:
    Jun 2009

    Posted 23 Aug 2013 Link to this post

    <UserControl.Resources>
     
    <Style x:Key="myGridViewRowStyle" TargetType="telerik:GridViewRow">
        
             <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
                <Setter Property="Background" Value="#c1cdd8" />
            </Style>
     
            <Style x:Key="myGridViewRowStyleAlt" TargetType="telerik:GridViewRow">
                <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
                <Setter Property="Background" Value="#b8babc" />
            </Style>
     
     
        </UserControl.Resources>
     
     
    <telerik:RadGridView
          
    RowStyle="{StaticResource myGridViewRowStyle}" AlternateRowStyle="{StaticResource myGridViewRowStyleAlt}"
     
    >

    Thats how I did in XAML
  6. srecov
    srecov avatar
    7 posts
    Member since:
    Jul 2013

    Posted 23 Aug 2013 Link to this post

    thank you a lot
Back to Top
DevCraft banner