clip board function (not used) option
syncfusion GridDataControl (v8.304.0.21)
I want not to use a clip board function.
Is it possible? Cannot seek a the method.
Must use Ctrl + C( and V ) Key press.
but it is impossible because of clipboard function.
Uses inputBinding functions.
I want not to use a clip board function.
Is it possible? Cannot seek a the method.
Must use Ctrl + C( and V ) Key press.
but it is impossible because of clipboard function.
Uses inputBinding functions.
SIGN IN To post a reply.
5 Replies
MN
Muthulakshmi N
Syncfusion Team
August 25, 2010 11:31 AM UTC
Hi Park,
Thank you for your details.
Here we have prepared a sample which illustrates your request. Please download the sample from the below location.
Link: http://www.syncfusion.com/uploads/redirect.aspx?file=GDCRoutedCommand_dfffa985.zip&team=development
[C# Code]
public static RoutedCommand CopyCommand = new RoutedCommand();
CommandBinding cb = new CommandBinding(CopyCommand, CopyCommandExecute, CopyCommandCanExecute);
this.CommandBindings.Add(cb);
private void CopyCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
private void CopyCommandExecute(object sender, ExecutedRoutedEventArgs e)
{
if (e.Parameter.ToString() == "opencommand")
opencommand();
}
public void opencommand()
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.ShowDialog();
}
Let us know if you need any details.
Thanks,
Muthulakshmi
Thank you for your details.
Here we have prepared a sample which illustrates your request. Please download the sample from the below location.
Link: http://www.syncfusion.com/uploads/redirect.aspx?file=GDCRoutedCommand_dfffa985.zip&team=development
[C# Code]
public static RoutedCommand CopyCommand = new RoutedCommand();
CommandBinding cb = new CommandBinding(CopyCommand, CopyCommandExecute, CopyCommandCanExecute);
this.CommandBindings.Add(cb);
private void CopyCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
private void CopyCommandExecute(object sender, ExecutedRoutedEventArgs e)
{
if (e.Parameter.ToString() == "opencommand")
opencommand();
}
public void opencommand()
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.ShowDialog();
}
Let us know if you need any details.
Thanks,
Muthulakshmi
JP
jungjin Park.
August 26, 2010 06:04 AM UTC
Hello~
Thanks for your reply.
I added Ctrl + v and Ctrl + c in your sample.
1. Xmal.
2. C# code.
private void CopyCommandExecute(object sender, ExecutedRoutedEventArgs e)
{
if (e.Parameter.ToString() == "opencommand")
{
opencommand(); => event occur. (usable)
}
else if (e.Parameter.ToString() == "copycommand")
{
opencommand(); => event does not occur. (not enabled : Ctrl + c)
}
else if (e.Parameter.ToString() == "pastcommand")
{
opencommand(); => event does not occur.(not enabled : Ctrl + v)
}
}
I want to control Ctrl + C and Ctrl + V.
Thank you.
GDCRoutedCommand_dfffa985_1_2c6a49e3.zip
Thanks for your reply.
I added Ctrl + v and Ctrl + c in your sample.
1. Xmal.
2. C# code.
private void CopyCommandExecute(object sender, ExecutedRoutedEventArgs e)
{
if (e.Parameter.ToString() == "opencommand")
{
opencommand(); => event occur. (usable)
}
else if (e.Parameter.ToString() == "copycommand")
{
opencommand(); => event does not occur. (not enabled : Ctrl + c)
}
else if (e.Parameter.ToString() == "pastcommand")
{
opencommand(); => event does not occur.(not enabled : Ctrl + v)
}
}
I want to control Ctrl + C and Ctrl + V.
Thank you.
GDCRoutedCommand_dfffa985_1_2c6a49e3.zip
MN
Muthulakshmi N
Syncfusion Team
August 30, 2010 08:33 AM UTC
Hi park,
Thank you for your details.
Here we have prepared a sample which illustrates your request. Please download the sample from the below location.
[C# Code]
CommandBinding cb = new CommandBinding(CopyCommand, CopyCommandExecute, CopyCommandCanExecute);
this.CommandBindings.Add(cb);
KeyGesture kg = new KeyGesture(Key.C, ModifierKeys.Control);// KeyGesture kg = new KeyGesture(Key.V, ModifierKeys.Control);
InputBinding ib = new InputBinding(CopyCommand, kg);
this.InputBindings.Add(ib);
textBox.CommandBindings.Add(cb);
textBox.InputBindings.Add(ib);
dataGrid.ModelLoaded += (s, e) =>
{
dataGrid.Model.Grid.CommandBindings.Add(cb);
dataGrid.Model.Grid.InputBindings.Add(ib);
};
}
private void CopyCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
private void CopyCommandExecute(object sender, ExecutedRoutedEventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.ShowDialog();
}
Link: http://www.syncfusion.com/uploads/redirect.aspx?file=GDCRoutedCommand_52506d37.zip&team=development
Let us know if you need any details.
Regards,
Muthulakshmi
Thank you for your details.
Here we have prepared a sample which illustrates your request. Please download the sample from the below location.
[C# Code]
CommandBinding cb = new CommandBinding(CopyCommand, CopyCommandExecute, CopyCommandCanExecute);
this.CommandBindings.Add(cb);
KeyGesture kg = new KeyGesture(Key.C, ModifierKeys.Control);// KeyGesture kg = new KeyGesture(Key.V, ModifierKeys.Control);
InputBinding ib = new InputBinding(CopyCommand, kg);
this.InputBindings.Add(ib);
textBox.CommandBindings.Add(cb);
textBox.InputBindings.Add(ib);
dataGrid.ModelLoaded += (s, e) =>
{
dataGrid.Model.Grid.CommandBindings.Add(cb);
dataGrid.Model.Grid.InputBindings.Add(ib);
};
}
private void CopyCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
e.CanExecute = true;
}
private void CopyCommandExecute(object sender, ExecutedRoutedEventArgs e)
{
OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.ShowDialog();
}
Link: http://www.syncfusion.com/uploads/redirect.aspx?file=GDCRoutedCommand_52506d37.zip&team=development
Let us know if you need any details.
Regards,
Muthulakshmi
JP
jungjin Park.
August 31, 2010 03:58 AM UTC
Hi~
I saw sample code.
It is a solution method which my question.
Thank you for your consideration.
I saw sample code.
It is a solution method which my question.
Thank you for your consideration.
MN
Muthulakshmi N
Syncfusion Team
September 1, 2010 04:35 AM UTC
Hi Park,
Thank you for your update.
Let us know if you need any details.
Regards,
Muthulakshmi.N
Thank you for your update.
Let us know if you need any details.
Regards,
Muthulakshmi.N
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
JP jungjin Park.
- Aug 18, 2010 06:07 AM UTC
- Sep 1, 2010 04:35 AM UTC