private
void
filter_EditorCreated(
object
sender, Telerik.Windows.Controls.Data.DataFilter.EditorCreatedEventArgs e)
{
DataObject.AddPastingHandler(e.Editor,
new
DataObjectPastingEventHandler(CheckPasteFormat));
}
public
void
CheckPasteFormat(
object
sender, DataObjectPastingEventArgs e)
{
PasteWindow win =
new
PasteWindow();
win.ShowDialog();
// Modal dialog
string
result = win.Value.ToString();
DataObject d =
new
DataObject();
d.SetData(DataFormats.Text, result);
e.DataObject = d;
}
Cannot perform this operation while dispatcher processing is suspended.
I have found a solution to this using Dispather.BeginInvoke but this has another problem with the folowing part updating the DataObject due to it is asynchroniously. There might be solutions to this also, but it gives me a feeling of a lot of hacks to make it work
So my next approach (and maybee more correct solution) would be to define a new "Paste special" command/functionality to handle my special pasting inside editor. Actually kind of the same way as Word, Excell etc does it, Im not very familiar with commands and stuff like that. Can you tell me if it is possible to add/append a "paste special" command with keyboard shortcut to the radDataFilter editors. It should also be available using the right-click menu in the radDataFilter editors.
Hopefully the "Speciel paste" will support undo etc, and clipboard content should not be changed using the "Speciel paste".
Hopefully you will be able to help me with this one.
Your help will be really appreciated.
Thanks,
Gayu
RadBusyIndicator busyIndicator =
new
RadBusyIndicator();
// make it trasparent to avoid flashing on fast operations
Setter opacitySetter =
new
Setter(Rectangle.OpacityProperty, 0.0);
Style overlayStyle =
new
Style();
overlayStyle.Setters.Add(opacitySetter);
busyIndicator.OverlayStyle = overlayStyle;
// add to layoutRoot children
busyIndicator.SetValue(Grid.RowProperty, 0);
busyIndicator.SetValue(Grid.RowSpanProperty, 3);
layoutRoot.Children.Add(busyIndicator);
<
telerik:RadComboBox
Grid.Column
=
"3"
Grid.Row
=
"6"
IsReadOnly
=
"True"
IsEditable
=
"True"
/>