Skip to content

Commit 5b2e1a9

Browse files
Merge pull request #1 from ShobikaPalani/master
Sample to demonstrate how to drag and drop rows between two wpf datagrids
2 parents 4f314d7 + 1cbbbea commit 5b2e1a9

23 files changed

+1314
-0
lines changed

App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/>
5+
</startup>
6+
</configuration>

App.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="DragandDropDemo.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:DragandDropDemo"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>

App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace DragandDropDemo
10+
{
11+
/// <summary>
12+
/// Interaction logic for App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}

DragandDropDemo_2010.csproj

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{FE150A87-943E-43AB-9E9C-51444F542094}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>DragandDropDemo</RootNamespace>
11+
<AssemblyName>DragandDropDemo</AssemblyName>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15+
<WarningLevel>4</WarningLevel>
16+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
17+
<TargetFrameworkProfile />
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<PlatformTarget>AnyCPU</PlatformTarget>
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<PlatformTarget>AnyCPU</PlatformTarget>
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="Syncfusion.Data.WPF">
40+
</Reference>
41+
<Reference Include="Syncfusion.SfGrid.WPF">
42+
</Reference>
43+
<Reference Include="Syncfusion.Shared.WPF">
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Xml" />
48+
<Reference Include="Microsoft.CSharp" />
49+
<Reference Include="System.Core" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="System.Net.Http" />
53+
<Reference Include="System.Xaml">
54+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
55+
</Reference>
56+
<Reference Include="WindowsBase" />
57+
<Reference Include="PresentationCore" />
58+
<Reference Include="PresentationFramework" />
59+
</ItemGroup>
60+
<ItemGroup>
61+
<ApplicationDefinition Include="App.xaml">
62+
<Generator>MSBuild:Compile</Generator>
63+
<SubType>Designer</SubType>
64+
</ApplicationDefinition>
65+
<Compile Include="Model\UserInfo.cs" />
66+
<Compile Include="Model\UserinfoRepository.cs" />
67+
<Compile Include="ViewModel\ViewModel.cs" />
68+
<Page Include="MainWindow.xaml">
69+
<Generator>MSBuild:Compile</Generator>
70+
<SubType>Designer</SubType>
71+
</Page>
72+
<Compile Include="App.xaml.cs">
73+
<DependentUpon>App.xaml</DependentUpon>
74+
<SubType>Code</SubType>
75+
</Compile>
76+
<Compile Include="MainWindow.xaml.cs">
77+
<DependentUpon>MainWindow.xaml</DependentUpon>
78+
<SubType>Code</SubType>
79+
</Compile>
80+
</ItemGroup>
81+
<ItemGroup>
82+
<Compile Include="Properties\AssemblyInfo.cs">
83+
<SubType>Code</SubType>
84+
</Compile>
85+
<Compile Include="Properties\Resources.Designer.cs">
86+
<AutoGen>True</AutoGen>
87+
<DesignTime>True</DesignTime>
88+
<DependentUpon>Resources.resx</DependentUpon>
89+
</Compile>
90+
<Compile Include="Properties\Settings.Designer.cs">
91+
<AutoGen>True</AutoGen>
92+
<DependentUpon>Settings.settings</DependentUpon>
93+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
94+
</Compile>
95+
<EmbeddedResource Include="Properties\Resources.resx">
96+
<Generator>ResXFileCodeGenerator</Generator>
97+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
98+
</EmbeddedResource>
99+
<None Include="Properties\Settings.settings">
100+
<Generator>SettingsSingleFileGenerator</Generator>
101+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
102+
</None>
103+
<AppDesigner Include="Properties\" />
104+
</ItemGroup>
105+
<ItemGroup>
106+
<None Include="App.config" />
107+
</ItemGroup>
108+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
109+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
110+
Other similar extension points exist, see Microsoft.Common.targets.
111+
<Target Name="BeforeBuild">
112+
</Target>
113+
<Target Name="AfterBuild">
114+
</Target>
115+
-->
116+
</Project>

DragandDropDemo_2010.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2010
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DragandDropDemo_2010", "DragandDropDemo_2010.csproj", "{FE150A87-943E-43AB-9E9C-51444F542094}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{FE150A87-943E-43AB-9E9C-51444F542094}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{FE150A87-943E-43AB-9E9C-51444F542094}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{FE150A87-943E-43AB-9E9C-51444F542094}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{FE150A87-943E-43AB-9E9C-51444F542094}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal

DragandDropDemo_2012.csproj

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{FE150A87-943E-43AB-9E9C-51444F542094}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<AppDesignerFolder>Properties</AppDesignerFolder>
10+
<RootNamespace>DragandDropDemo</RootNamespace>
11+
<AssemblyName>DragandDropDemo</AssemblyName>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
13+
<FileAlignment>512</FileAlignment>
14+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
15+
<WarningLevel>4</WarningLevel>
16+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
17+
<TargetFrameworkProfile />
18+
</PropertyGroup>
19+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
20+
<PlatformTarget>AnyCPU</PlatformTarget>
21+
<DebugSymbols>true</DebugSymbols>
22+
<DebugType>full</DebugType>
23+
<Optimize>false</Optimize>
24+
<OutputPath>bin\Debug\</OutputPath>
25+
<DefineConstants>DEBUG;TRACE</DefineConstants>
26+
<ErrorReport>prompt</ErrorReport>
27+
<WarningLevel>4</WarningLevel>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
30+
<PlatformTarget>AnyCPU</PlatformTarget>
31+
<DebugType>pdbonly</DebugType>
32+
<Optimize>true</Optimize>
33+
<OutputPath>bin\Release\</OutputPath>
34+
<DefineConstants>TRACE</DefineConstants>
35+
<ErrorReport>prompt</ErrorReport>
36+
<WarningLevel>4</WarningLevel>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="Syncfusion.Data.WPF">
40+
</Reference>
41+
<Reference Include="Syncfusion.SfGrid.WPF">
42+
</Reference>
43+
<Reference Include="Syncfusion.Shared.WPF">
44+
</Reference>
45+
<Reference Include="System" />
46+
<Reference Include="System.Data" />
47+
<Reference Include="System.Xml" />
48+
<Reference Include="Microsoft.CSharp" />
49+
<Reference Include="System.Core" />
50+
<Reference Include="System.Xml.Linq" />
51+
<Reference Include="System.Data.DataSetExtensions" />
52+
<Reference Include="System.Net.Http" />
53+
<Reference Include="System.Xaml">
54+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
55+
</Reference>
56+
<Reference Include="WindowsBase" />
57+
<Reference Include="PresentationCore" />
58+
<Reference Include="PresentationFramework" />
59+
</ItemGroup>
60+
<ItemGroup>
61+
<ApplicationDefinition Include="App.xaml">
62+
<Generator>MSBuild:Compile</Generator>
63+
<SubType>Designer</SubType>
64+
</ApplicationDefinition>
65+
<Compile Include="Model\UserInfo.cs" />
66+
<Compile Include="Model\UserinfoRepository.cs" />
67+
<Compile Include="ViewModel\ViewModel.cs" />
68+
<Page Include="MainWindow.xaml">
69+
<Generator>MSBuild:Compile</Generator>
70+
<SubType>Designer</SubType>
71+
</Page>
72+
<Compile Include="App.xaml.cs">
73+
<DependentUpon>App.xaml</DependentUpon>
74+
<SubType>Code</SubType>
75+
</Compile>
76+
<Compile Include="MainWindow.xaml.cs">
77+
<DependentUpon>MainWindow.xaml</DependentUpon>
78+
<SubType>Code</SubType>
79+
</Compile>
80+
</ItemGroup>
81+
<ItemGroup>
82+
<Compile Include="Properties\AssemblyInfo.cs">
83+
<SubType>Code</SubType>
84+
</Compile>
85+
<Compile Include="Properties\Resources.Designer.cs">
86+
<AutoGen>True</AutoGen>
87+
<DesignTime>True</DesignTime>
88+
<DependentUpon>Resources.resx</DependentUpon>
89+
</Compile>
90+
<Compile Include="Properties\Settings.Designer.cs">
91+
<AutoGen>True</AutoGen>
92+
<DependentUpon>Settings.settings</DependentUpon>
93+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
94+
</Compile>
95+
<EmbeddedResource Include="Properties\Resources.resx">
96+
<Generator>ResXFileCodeGenerator</Generator>
97+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
98+
</EmbeddedResource>
99+
<None Include="Properties\Settings.settings">
100+
<Generator>SettingsSingleFileGenerator</Generator>
101+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
102+
</None>
103+
<AppDesigner Include="Properties\" />
104+
</ItemGroup>
105+
<ItemGroup>
106+
<None Include="App.config" />
107+
</ItemGroup>
108+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
109+
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
110+
Other similar extension points exist, see Microsoft.Common.targets.
111+
<Target Name="BeforeBuild">
112+
</Target>
113+
<Target Name="AfterBuild">
114+
</Target>
115+
-->
116+
</Project>

DragandDropDemo_2012.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 2012
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DragandDropDemo_2012", "DragandDropDemo_2012.csproj", "{FE150A87-943E-43AB-9E9C-51444F542094}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{FE150A87-943E-43AB-9E9C-51444F542094}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{FE150A87-943E-43AB-9E9C-51444F542094}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{FE150A87-943E-43AB-9E9C-51444F542094}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{FE150A87-943E-43AB-9E9C-51444F542094}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal

0 commit comments

Comments
 (0)