there is thing that I want to do but I stack as a dummy. Here is the steps;
Here is code I done so far.
private void dtg_tabletrial_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.D && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
{
MessageBox.Show("You hit ctrl + D");
}
}
private void dtg_view_InitNewRow(object sender, DevExpress.Xpf.Grid.InitNewRowEventArgs e)
{
dtg_tabletrial.SetCellValue(e.RowHandle, "UserName", "emre");
dtg_tabletrial.SetCellValue(e.RowHandle, "Surname", "newcompany");
dtg_tabletrial.SetCellValue(e.RowHandle, "Address", "new addres");
dtg_tabletrial.SetCellValue(e.RowHandle, "Phone", "new phone");
}
Thanks again to Mike Strobel , but I also included another solution for that. I'm writing down here to someone who will need it.
Peace
private void dtg_tabletrial_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.D && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control)
{
DataGridTrialTable ff = new DataGridTrialTable();
ff.Address = dtgtrialTable.LastOrDefault().Address;
ff.UserName = dtgtrialTable.LastOrDefault().UserName;
ff.Phone = dtgtrialTable.LastOrDefault().Phone;
ff.Surname = dtgtrialTable.LastOrDefault().Surname;
dtgtrialTable.Add(ff);
}
}