I paste formatted text array to data grid and it works fine. However, when the datagrid is editing mode I want to paste the clipboard data exactly where the cursor point is. By default datagrid's can paste any point of selection.
Is it possible to get the SelectionIndex of DataGridTextColumn when its in editing Mode(Not SelectedIndex) in WPF?
DataGridCellInfo cell1 = data_grid.SelectedCells[datagridColumn];
string text = Convert.ToString((cell1.Item as ChoiceList).Choice);
TextBox textBox = new TextBox();
textBox.Text = text+ data[0,0];
int ind = ((cell1.Item as ChoiceList).Id) - 1;
ChoiceListView[ind].Choice = textBox.Text;
TextBox
of theDataGridTextColumn
? (e.g. "Hello W|orld" caret is at position 7) – Keith Stein