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

Row Drag Drop inside Viewbox

8 Answers 152 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Boots
Top achievements
Rank 1
Boots asked on 30 Jun 2009, 08:06 PM

I’m using the rowdragdrop example inside of a viewbox. Theviewbox is set to stretch=”Fill”. The problem I’m having is that when the userresizes the window and moves a row the offset inside the viewbox isn’t changingwhich means the position of the row that I’m dragging isn’t under the mouse.

I was wondering if you had any ideas on how this could befixed?

Thanks

~Boots

8 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 02 Jul 2009, 10:56 AM
Hello Ben,

Could you send us small project demonstrating this issue?
It will be of great help to resolve this. Thanks.

All the best,
Hristo
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
Boots
Top achievements
Rank 1
answered on 02 Jul 2009, 01:26 PM
Hristo,
Who should I send the sample project to? All I basically did was copy the RowDragDrop example and enclosed the main grid inside a viewbox.
<Window x:Class="RowDragDrop.MainWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
    Title="Drag and drop of RadGridView rows" Height="600" Width="800"
    <Window.Resources> 
        <Grid x:Key="DropIndicator" Background="Transparent" > 
            <Grid.ColumnDefinitions> 
                <ColumnDefinition Width="30" /> 
                <ColumnDefinition Width="*" /> 
            </Grid.ColumnDefinitions> 
            <Path HorizontalAlignment="Left" Grid.Row="0"  Grid.Column="0" VerticalAlignment="Center"  Stretch="Fill"  
                      Stroke="#FF000000" StrokeThickness="0"  Width="19.875" Height="15" Margin="10,0,0,0" 
                      Data="M8.7773983,186.18793 L8.7759613,187.94103 11.648741,187.94104 11.65398,188.94436 13.937962,187.05081 11.632825,185.09421 11.632825,186.18644 z" Fill="Blue" StrokeLineJoin="Miter"></Path> 
            <Border Height="3" Grid.Row="0"  Grid.Column="1" VerticalAlignment="Center" Background="Blue" Opacity="0.5" /> 
        </Grid> 
    </Window.Resources> 
    <Viewbox Stretch="Fill"
        <Grid> 
            <telerik:RadGridView x:Name="GridView" Height="500" /> 
        </Grid> 
    </Viewbox> 
</Window> 

Thanks again,
~Boots
0
Hristo
Telerik team
answered on 03 Jul 2009, 08:49 AM
Hello Ben,

I'm sorry for the misunderstanding. I found the example you are talking about.
Viewbox is special case control that measure its child with infinity. This cause the grid stop virtualize.
Other issue is that transformation are not correct because of the Viewbox.
I was wondering what is the reason to put RadGridView inside Viewbox?

One side note - in order to be able to send us project you should open a support ticket. Support ticket allow attachments.

Greetings,
Hristo
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
Boots
Top achievements
Rank 1
answered on 06 Jul 2009, 01:26 PM
Hello Hristo,

Thanks for the response. We are hosting a UserControl  in a winform which we are then hosting in our 3rd party window (its what we have to do to get WPF content in our application).  Its not just a radgridview that we have to encapsulate in a Viewbox, but the whole usercontrol needs to be so the UI will stretch/grow properly within our 3rd party window.

Thanks again,
~Boots
0
Accepted
Hristo
Telerik team
answered on 07 Jul 2009, 04:22 PM
Hello Boots,

I've modified the example a little bit so that it will work when in Viewbox (attached).
Let me know if this works for you.

Best wishes,
Hristo
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
Boots
Top achievements
Rank 1
answered on 07 Jul 2009, 04:51 PM
Hristo,

Thank you very much for the modified example. Its working better than I expected. I noticed you also fixed it so it wouldn't drag the column headers as if they were a row. Thank you for that as well.

Thanks again,
~Boots
0
nbahl
Top achievements
Rank 1
answered on 08 Jan 2010, 05:55 PM
I am using this project with Q3 2009 controls and it seems that the RadItemsControl is no longer available in this release.  Is there something that replaced it?

Thanks,
Nate
0
Pavel Pavlov
Telerik team
answered on 14 Jan 2010, 02:39 PM
Hello nbahl,

Please find attached the sample updated to use the newer version of RadGridView.

Greetings,
Pavel Pavlov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Boots
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Boots
Top achievements
Rank 1
nbahl
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or