/
Form1.cs
45 lines (38 loc) · 1.39 KB
/
Form1.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#region Copyright Syncfusion Inc. 2001-2018.
// Copyright Syncfusion Inc. 2001-2018. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using Syncfusion.WinForms.Controls;
using Syncfusion.WinForms.DataGrid.Styles;
using System.Windows.Forms;
using Syncfusion.WinForms.DataGrid.Enums;
using Syncfusion.WinForms.DataGrid.Events;
namespace GettingStarted
{
public partial class Form1 : Form
{
#region Constructor
public Form1()
{
InitializeComponent();
var data = new OrderInfoCollection();
sfDataGrid.DataSource = data.OrdersListDetails;
this.sfDataGrid.CurrentCellBeginEdit += sfDataGrid1_CurrentCellBeginEdit;
this.sfDataGrid.CurrentCellEndEdit += sfDataGrid1_CurrentCellEndEdit;
}
System.Diagnostics.Process process;
void sfDataGrid1_CurrentCellEndEdit(object sender, CurrentCellEndEditEventArgs e)
{
if (!process.HasExited)
process.Kill();
}
void sfDataGrid1_CurrentCellBeginEdit(object sender, CurrentCellBeginEditEventArgs e)
{
process = System.Diagnostics.Process.Start("Osk.exe");
}
#endregion
}
}