■ GridControl 클래스 : TableView에서 드래그 & 드롭 사용하기

----------------------------------------------------------------------------------------------------


TestProject.zip


MainWindow.xaml

 

 

<Window x:Class="TestProject.MainWindow"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"

    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"

    Width="800"

    Height="600"

    Title="GridControl 클래스 : Table View에서 드래그 &amp; 드롭 사용하기"

    FontFamily="나눔고딕코딩"

    FontSize="16">

    <Grid>

        <dxg:GridControl x:Name="gridControl"

            AllowLiveDataShaping="True"

            SelectionMode="Row">

            <dxg:GridControl.Columns>

                <dxg:GridColumn FieldName="ID"         ReadOnly="True" />

                <dxg:GridColumn FieldName="Name"       ReadOnly="True" />

                <dxg:GridColumn FieldName="Department" ReadOnly="True" />

                <dxg:GridColumn FieldName="Position"   ReadOnly="True" />

            </dxg:GridControl.Columns>

            <dxg:GridControl.View>

                <dxg:TableView

                    ShowGroupedColumns="True"

                    EditorShowMode="MouseUpFocused" />

            </dxg:GridControl.View>

            <i:Interaction.Behaviors>

                <dxg:GridDragDropManager

                    AllowDrag="True"

                    AllowDrop="True" />

            </i:Interaction.Behaviors>

        </dxg:GridControl>

    </Grid>

</Window>

 

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요