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

Drag and Drop Not working alternate rows

4 Answers 37 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kennet
Top achievements
Rank 2
Kennet asked on 22 Aug 2013, 10:09 AM
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.

4 Answers, 1 is accepted

Sort by
0
Kennet
Top achievements
Rank 2
answered on 22 Aug 2013, 10:17 AM
Opps, I solved it by using AlternateRowStyle and a setter for dragdrop manager..
0
srecov
Top achievements
Rank 1
answered on 23 Aug 2013, 12:27 PM
Hi, can you give an example, regards Srečo
0
Kennet
Top achievements
Rank 2
answered on 23 Aug 2013, 12:35 PM
<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
0
srecov
Top achievements
Rank 1
answered on 23 Aug 2013, 12:44 PM
thank you a lot
Tags
GridView
Asked by
Kennet
Top achievements
Rank 2
Answers by
Kennet
Top achievements
Rank 2
srecov
Top achievements
Rank 1
Share this question
or